The libjson API is very simple.
every functions returns a int that is either 0 for success, or a json_error if different from 0.
all callback takes an optional void * to be able to pass a pointer to anything to the callback function.
There's no assumption about how a file is supposed to be read, or how we suppose to allocate memory.
All libjson structure are fully available for the library user so that they can also be allocated on the function stack for pratical purpose.