I'm thinking about implementing JSON parser for Delphi. What should a good JSON parser do? Any ideas for requirements? I believe it should at least output and process JSON... Looking at XML parsers, should it be more DOM or SAX-like?
JSON. parse() is a crucial method for converting JSON data in string form into Javascript objects. It is possible to convert simple or complex objects, but you should never convert calculations or code, like for loops.
Writing a JSON parser is one of the easiest ways to get familiar with parsing techniques. The format is extremely simple.
The JSON.parse() method parses a JSON string, constructing the JavaScript value or object described by the string. An optional reviver function can be provided to perform a transformation on the resulting object before it is returned.
I think Json.NET does a pretty bang up job.
Note I may be a bit bias since I wrote it :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With