* Made quoting of strings optional, also when saving (bug ID #31741)

git-svn-id: trunk@54798 -
This commit is contained in:
michael 2017-05-01 18:55:33 +00:00
parent bf02a9101b
commit e33bff91df

View File

@ -302,7 +302,7 @@ procedure TMainForm.TVJSONEdited(Sender: TObject; Node: TTreeNode; var S: string
Var
D : TJSONData;
O : TJSONObject;
I : Integer;
L,I : Integer;
begin
D:=CurrentData;
@ -330,7 +330,11 @@ begin
begin
// value change
try
D.AsString:=S;
L:=Length(S);
if FQuoteStrings and (L>=2) and (S[1]='"') and (S[L]='"') then
D.AsString:=Copy(S,2,L-2)
else
D.AsString:=S;
except
ShowMessage(Format(SErrInvalidValue,[S]));
S:=D.AsString;