mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-06 05:10:52 +02:00
* Add joIgnoreDuplicates
git-svn-id: trunk@45840 -
This commit is contained in:
parent
e1c1bd3d60
commit
3d333a1d17
@ -129,7 +129,8 @@ begin
|
||||
// Add to existing structural type
|
||||
if (FStruct is TJSONObject) then
|
||||
begin
|
||||
TJSONObject(FStruct).Add(FKey,AValue);
|
||||
if (Not (joIgnoreDuplicates in options)) or (TJSONObject(FStruct).IndexOfName(FKey)=-1) then
|
||||
TJSONObject(FStruct).Add(FKey,AValue);
|
||||
FKey:='';
|
||||
end
|
||||
else if (FStruct is TJSONArray) then
|
||||
|
@ -51,7 +51,7 @@ type
|
||||
|
||||
EScannerError = class(EParserError);
|
||||
|
||||
TJSONOption = (joUTF8,joStrict,joComments,joIgnoreTrailingComma);
|
||||
TJSONOption = (joUTF8,joStrict,joComments,joIgnoreTrailingComma,joIgnoreDuplicates);
|
||||
TJSONOptions = set of TJSONOption;
|
||||
|
||||
Const
|
||||
|
Loading…
Reference in New Issue
Block a user