Re: [fpc-pascal] JSON Test Suite

2016-11-07 Thread Benito van der Zander
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

Re: [fpc-pascal] JSON Test Suite

2016-11-06 Thread Benito van der Zander
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

Re: [fpc-pascal] JSON Test Suite

2016-11-01 Thread Marco van de Voort
In our previous episode, leledumbo said: > > Nono: the test is correct. > > fcl-json gives an error, but in your test result it shows up as accepting > > it ? > > Eh? Will need to recheck. The requirement is clear: > > - 0 for accept > - 1 for reject > - >1 for crash > > Could it be one of the

Re: [fpc-pascal] JSON Test Suite

2016-11-01 Thread Michael Van Canneyt
On Tue, 1 Nov 2016, leledumbo wrote: Nono: the test is correct. fcl-json gives an error, but in your test result it shows up as accepting it ? Eh? Will need to recheck. The requirement is clear: - 0 for accept - 1 for reject - >1 for crash I understood that. I got 1 for the indicated test

Re: [fpc-pascal] JSON Test Suite

2016-11-01 Thread leledumbo
> Nono: the test is correct. > fcl-json gives an error, but in your test result it shows up as accepting > it ? Eh? Will need to recheck. The requirement is clear: - 0 for accept - 1 for reject - >1 for crash Could it be one of the two except block is wrongly executed? -- View this message

Re: [fpc-pascal] JSON Test Suite

2016-10-31 Thread Michael Van Canneyt
On Mon, 31 Oct 2016, leledumbo wrote: No problem. What about the false positive I demonstrated ? I guess we'll need to talk (open issue?) to the author for that. I have no idea if it's really should be supported or just a misunderstanding from the author. Nono: the test is correct. fcl-js

Re: [fpc-pascal] JSON Test Suite

2016-10-31 Thread leledumbo
> No problem. What about the false positive I demonstrated ? I guess we'll need to talk (open issue?) to the author for that. I have no idea if it's really should be supported or just a misunderstanding from the author. Anyway, FPC fcl-json is now merged into the repository: https://github.com/ns

Re: [fpc-pascal] JSON Test Suite

2016-10-31 Thread Michael Van Canneyt
On Sun, 30 Oct 2016, leledumbo wrote: In comparison to Go, no it isn't. I guess we have some work to do. I mean, if fcl-json wants to be on top. In comparison with others, we're among the second top lines (good cases mostly correct, bad cases a bit behind). At least fcl-json is way above 3 o

Re: [fpc-pascal] JSON Test Suite

2016-10-30 Thread leledumbo
> I mean, if fcl-json wants to be on top. In comparison with others, we're among the second top lines (good cases mostly correct, bad cases a bit behind). To make us proud, for the good cases, there are only 2 parsers that fully accept the test suite: java's nanojson & fcl-json -- View this me

Re: [fpc-pascal] JSON Test Suite

2016-10-30 Thread leledumbo
> In comparison to Go, no it isn't. I guess we have some work to do. I mean, if fcl-json wants to be on top. In comparison with others, we're among the second top lines (good cases mostly correct, bad cases a bit behind). At least fcl-json is way above 3 of Perl's parsers and Haskell which crashe

Re: [fpc-pascal] JSON Test Suite

2016-10-30 Thread Michael Van Canneyt
On Sun, 30 Oct 2016, Graeme Geldenhuys wrote: On 2016-10-30 13:48, leledumbo wrote: I just did with the following program: Awesome, thanks. Result is not very convincing: In comparison to Go, no it isn't. I guess we have some work to do. Well, things may not be so bad... Michael. _

Re: [fpc-pascal] JSON Test Suite

2016-10-30 Thread Michael Van Canneyt
On Sun, 30 Oct 2016, leledumbo wrote: Has anybody tried the FPC JSON parser with these tests? I just did with the following program: {$mode objfpc} uses Classes,SysUtils,fpjson,jsonparser; var Input: TStringList; JSON: TJSONData; begin try try Input := TStringList.Create; I

Re: [fpc-pascal] JSON Test Suite

2016-10-30 Thread Graeme Geldenhuys
On 2016-10-30 13:48, leledumbo wrote: > > I just did with the following program: Awesome, thanks. > Result is not very convincing: In comparison to Go, no it isn't. I guess we have some work to do. Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://f

Re: [fpc-pascal] JSON Test Suite

2016-10-30 Thread leledumbo
Whoops, it looks like a CSS is missing: style.css Plus, I compare it with Go 1.7's encoding/json package. -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/JSON-Test-Suite-tp5726702p57

Re: [fpc-pascal] JSON Test Suite

2016-10-30 Thread leledumbo
> Has anybody tried the FPC JSON parser with these tests? I just did with the following program: {$mode objfpc} uses Classes,SysUtils,fpjson,jsonparser; var Input: TStringList; JSON: TJSONData; begin try try Input := TStringList.Create; Input.LoadFromFile(ParamStr(1));

Re: [fpc-pascal] JSON Test Suite

2016-10-30 Thread Michael Van Canneyt
On Sun, 30 Oct 2016, Graeme Geldenhuys wrote: Hi, I just stubled acros this JSON test suite. There graph shows plenty of different JSON parsers and how they compare with this test suite. The Free Pascal JSON parser was not in that list. Has anybody tried the FPC JSON parser with these tests?