News for hackers. Stuff that matters.
Re:Show HN: Parson, lighweight json parser in C by thomaslee on Sunday October 28, 2012 @02:53PM (#4709636)
strndup is part of the "standard", but not present on some platforms unfortunately. :( I can't think of a modern C runtime that doesn't offer strdup, though.

The realloc check is good advice -- take heed, OP. :)

Re:Show HN: Parson, lighweight json parser in C by kgabis on Sunday October 28, 2012 @03:56PM (#4709794)
Realloc, strdup and strndup errors are handled as of now :) (https://github.com/kgabis/parson/commit/ee9be98974b3fdac0be1...) And yes, I've written my own strndup because it's "relatively new".
Re:Show HN: Parson, lighweight json parser in C by halayli on Sunday October 28, 2012 @03:02PM (#4709659)
True, strndup is relatively new (~7 years) to POSIX standard.