I wrote a JSON parser that avoids using dynamic memory but works a bit differently. It's a callback interface like SAX, but instead of pushing already "typed" data to the user, the user calls a function to interpret the data. In this fashion, if the user wants a float instead of an integer, they call the function for float. Likewise, if the user has some space allocated for string values, the library can convert the already inmemory JSON format string to UTF-8 in the user's buffer.
The C interface is purposely ugly but the C++ is much easier to work with.
The C interface is purposely ugly but the C++ is much easier to work with.
https://codehero.github.io/benejson/