function GetJSON not allowing dupplicate elements.
Original Reporter info from Mantis: Rumcajs
-
Reporter name:
Original Reporter info from Mantis: Rumcajs
- Reporter name:
Description:
i have try to compile and run my 2.0.6 programm on 2.10.0, its compile fine but then if i start it and its read the json text file it gives me dupplicate error.
here a sample json file :
{
"13" : {
"title" : "Das Neue Testament"
},
"-" : {},
"5" : {
"title" : "Markus-Evangelium"
},
"4" : {
"title" : "Matthäus-Evangelium"
}
"-" : {}
}
The problem is the "-" element which appears more that 1 time in the file and 2.10.0 gives a error, in 2.0.6 i don't have that problem, i use the "-" as seperator if i build a view of that file. I attach the full file.
Steps to reproduce:
uses ..., fpjson, jsonparser;
procedure Test;
var
jdb : TJSONObject;
f : TStringList;
begin
f := TStringList.Create;
try
f.LoadFromFile(That Attached File);
jdb := TJSONObject(GetJSON(f.Text));
//here the error occurs on 2.10.0, but on 2.0.6 everything is like expected.
finally
f.Free;
end;
end;
Mantis conversion info:
- Mantis ID: 37381
- Build: r63526
- Version: 2.0.10