[fpc-pascal] JSON Test Suite

Benito van der Zander benito at benibela.de
Mon Nov 7 13:42:37 CET 2016


Hi,
huh, why does the build suddenly fail?

Well, FPC 3.0.0 does not have the joStrict option.
It is only there in 3.1.1.

Perhaps there should be two fpc parser entries.

Best,
Benito


On 06.11.2016 17:34, Benito van der Zander wrote:
> Hi,
>
> it is better to use TJSONParser than GetJSON.
>
> GetJSON is defined as:
>
> procedure DefJSONParserHandler(AStream: TStream; const AUseUTF8: 
> Boolean; out
>   Data: TJSONData);
>
> Var
>   P : TJSONParser;
>
> begin
>   Data:=Nil;
>   P:=TJSONParser.Create(AStream,[joUTF8]);
>   try
>     Data:=P.Parse;
>   finally
>     P.Free;
>   end;
> end;
>
> with
>
> procedure DefJSONParserHandler(AStream: TStream; const AUseUTF8: 
> Boolean; out
>   Data: TJSONData);
>
> Var
>   P : TJSONParser;
>
> begin
>   Data:=Nil;
>   P:=TJSONParser.Create(AStream,[*joStrict,*joUTF8]);
>   try
>     Data:=P.Parse;
>   finally
>     P.Free;
>   end;
> end;
>
> it should pass more
>
>
> Best,
>
> Benito
>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20161107/d37e472c/attachment.html>


More information about the fpc-pascal mailing list