[fpc-pascal] Strange experience with TJsonConfig.Clear
Bart
bartjunk64 at gmail.com
Sat Nov 23 23:33:47 CET 2019
On Sat, Nov 23, 2019 at 7:47 PM Bart <bartjunk64 at gmail.com> wrote:
As I was afraid: User error!
Cfg.JSONOptions := Cfg.JSONOptions + [joIgnoreTrailingComma];
This forces a reload of the file (since Filename isn't empty at this point).
(B.t.w. fpc trunk raise an error :
An unhandled exception occurred at $00438A84:
EJSON: Duplicate object member: "Naam"
$00438A84 TJSONDATA__DOERROR, line 1388 of ./fcl-json/src/fpjson.pp
$0043C593 TJSONOBJECT__DOADD, line 3411 of ./fcl-json/src/fpjson.pp
$0043C5CA TJSONOBJECT__ADD, line 3426 of ./fcl-json/src/fpjson.pp
That's better than screwing up the file ...
)
--
Bart
More information about the fpc-pascal
mailing list