-
Notifications
You must be signed in to change notification settings - Fork 26
tinyserialize #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Cool thx. I think this topic is a interesting addition! I also have small msgpack and json/json5 parsers/writers lying around! :D |
Oh great. I've been interested in JSON parsers lately. The more the better. It's nice to see a wide variety of styles to get ideas from. In my own game I'm using something really similar to JSON and spent a lot of energy to make sure that code is easy to re-learn later when I need to modify it... Most parsers I've seen were not written with code maturation in mind. |
I've extracted tinyjson5 from AVA engine. It is a JSON5/SJSON/JSON parser and JSON writer, which happens to be small and fast enough (parses 55 MiB JSON file at 230 ms in my computer). Hope it helps or serves as a good base :D Feedback welcome! cl tinyjson5.c -DJSON5_C -DJSON5_BENCH /O2 /Oy /MT /DNDEBUG
cl tinyjson5.c -DJSON5_C -DJSON5_DEMO /O2 /Oy /MT /DNDEBUG PS: Dunno if tinydixy or tinyini+ could also satisfy your needs. Is it for config files maybe? |
That JSON parser does look pretty well written. Thanks! I'll be coming back in the future and probably referencing it :P I took a look at ini, but actually have no idea how to use it. Can it save ini files? Can it add sections? Or is it only for loading ini files? Personally I would look for something like |
tinyini only load files and provide a list of pairs {key:value}. |
in the tinyini demo, rather than printf'ing pairs, you could add them to a |
Here's one you might like! It's endian agnostic since it reads or writes one byte at the time. The underlying CPU architecture handles endianness within the bitshift operators. No need for byteswap stuff. I use these functions all the time. Very copy + pasteable.
The text was updated successfully, but these errors were encountered: