Hope this is the correct space for this note
https://wiki.freepascal.org/JSON says:
This implementation adheres strictly to the RFC 4627 guidelines above and does not allow deviation from the specification.
The same wiki also says:
allows trailing comma after the last member of an array
After some problems consuming user-created json, I feel like the former statement is true and the other case is incorrect
I was able to bypass this problem entirely using
https://forum.lazarus.freepascal.org/index.php/topic,46533.0.html but I think the "Strict" member is not getting referenced
procedure MyJSONParserHandler(AStream: TStream; const AUseUTF8: Boolean; out
Data: TJSONData);
Var
P : TJSONParser;
begin
Data:=Nil;
P:=TJSONParser.Create(AStream,AUseUTF8);
P.Strict := False; //This line is my attempt to get that comma to parse
try
Data:=P.Parse;
finally
P.Free;
end;
end;