[fpc-pascal] JSON SAX-based reader
Michael Van Canneyt
michael at freepascal.org
Sat Jun 24 13:09:17 CEST 2017
On Fri, 23 Jun 2017, Stefan V. Pantazi wrote:
> 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.
It has been superseded by the more flexible 'Options' property since quite some time;
It was marked 'deprecated' in 3.0, and has now been removed in trunk.
>
> 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.
The JSONConfig has not been changed recently, I suspect this change was
already in 3.0.
>
> Hope this helps,
It does, and I hope the above helps you in reviving your code :)
Michael.
More information about the fpc-pascal
mailing list