[fpc-pascal] JSON SAX-based reader

Stefan V. Pantazi svpantazi at gmail.com
Fri Jun 23 23:55:10 CEST 2017

Thank you for this, Michael. I think it is wonderful work.

I've done some old tests of the new implementation and it looks very 
good. The only failed tests were related to date and time 
representation. This appears to be fixed in the new version. Most 
importantly, I see no memory leaks when parsing fails due to malformed 
JSON, and that is great!

The only fixes I had to do to my own software to accommodate the new 
implementation, were:

1) comment out the "Strict" property of the TJSONParser (it appears it 
no longer exists); I used to set it to false, to allow for more 
flexibility in JSON syntax.

2) add the missing procedure SetKey(obj:TJSONObject); to TJSONConfig 
since it was removed from the new version of jsonconf.pp; anyway, in 
this particular case, it may be me that has to rethink and simplify my 
use of the json config component that does not need SetKey.

Hope this helps,


On 06/23/2017 02:48 AM, Michael Van Canneyt wrote:
> Hello,
> I have changed the JSON parser, it is now written on top of a SAX-like JSON
> reader (which is available separately). All unit tests work fine, and the
> few extra tests which I did also, but I would like to hear if someone has
> code that no longer works.
> The change is committed in trunk. The new JSON reader is available in the
> unit jsonreader. Useful if you want to process large amounts of JSON data
> without building the whole JSON document in memory.
> Michael.
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


More information about the fpc-pascal mailing list