rxi/sj.h
View on GitHub ↗ ★ 1,554 C
A tiny little JSON parsing library
6 mentions on Hacker News by 6 people: 1 story, 5 comments · first 2025-09-21 · latest 2025-09-22
20082026
-
r->depth would have been initialized to zero here https://github.com/rxi/sj.h/blob/5cb5df45c8c37fd8c2322026a11...
comment by oguz-ismail · 2025-09-22 · in Sj.h: A tiny little JSON parsing library in ~150 lines of C99 -
…specify that this structure would be 0 initialized by default, or is this line missing a = { 0 }? - https://github.com/rxi/sj.h/blob/5cb5df45c8c37fd8c2322026a11... - it reads to me like r->depth might be randomly initialized and equal to…
comment by z0r · 2025-09-22 · in Sj.h: A tiny little JSON parsing library in ~150 lines of C99 -
That's detected as an error though? https://github.com/rxi/sj.h/blob/eb725e0858877e86932128836c1...
comment by flohofwoe · 2025-09-21 · in Sj.h: A tiny little JSON parsing library in ~150 lines of C99 -
The library doesn’t check for signed integer overflow here: https://github.com/rxi/sj.h/blob/eb725e0858877e86932128836c1... https://github.com/rxi/sj.h/blob/eb725e0858877e86932128836c1... https://github.com/rxi/sj.h/blob/eb725e0858877e86932…
comment by layer8 · 2025-09-21 · in Sj.h: A tiny little JSON parsing library in ~150 lines of C99 -
It seems so: https://github.com/rxi/sj.h/blob/master/demo%2Fobject.c
comment by morcus · 2025-09-21 · in Sj.h: A tiny little JSON parsing library in ~150 lines of C99