mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-08 23:27:26 +01:00
* Made quoting of strings optional, also when saving (bug ID #31741)
git-svn-id: trunk@54798 -
This commit is contained in:
parent
bf02a9101b
commit
e33bff91df
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user