New Reflection-Based JSON Encoder/Decoder
BlitzMax Forums/BlitzMax Programming/New Reflection-Based JSON Encoder/Decoder
| ||
http://code.google.com/p/bmx-rjson/ It is in a usable state, but type-specific metadata is still in the works. Includes very little documentation aside from the test suite at present. |
| ||
Very cool, just about to start on a project where son may come into play so this could save me a LOT of time, can't wait to find time to play with it! |
| ||
Thanks for the code. I'm also starting to use JSON. XML is a liitle hard on the eyes for me :-) |
| ||
What is JSON? |
| ||
json.org It's a very simple data exchange format. Think of it like a useful version of an .ini file. The 'JS' is because it is also valid javascript code, so the idea was you would get a JSON string and eval() it to get the data structure automatically. It's so useful that people write encoders and decoders in other languages. |
| ||
Cool. JSON is a very nice format. Seems more efficient than XML for serialization as well. Just curious, but were you aware of cower.jonk (a JSON parser) and duct.json (a JSON handler for cower.jonk)? |
| ||
@Htbaa Thanks for the link to the parser. I couldn't find any example in the files on how to use cower.jonk. Do you know of any examples out there? Last edited 2010 |
| ||
The Maximus client makes use of duct.json, which in turn uses cower.jonk. You could go from there I suppose. For duct.json there's actually an example available. |