Problem modifying TJsonObject

The following code

procedure TForm3.WebButton2Click(Sender: TObject);
var
  o: TJsonObject;
begin
  o := TJsonObject.ParseJSONValue('{ "Fvalue": "boo" }') as TJsonObject;
  o.Values['Fvalue'].Value := 'Hello';
  Memo.Lines.Add(o.ToJSON);
end;

fails to alter the contents of the JSON object. It displays a string of {"Fvalue":"boo"}

yet the following code

procedure TForm3.WebButton1Click(Sender: TObject);
var
  o: TJsonObject;
begin
  o := TJsonObject.ParseJSONValue('{ "Fvalue": "boo" }') as TJsonObject;
  o.AddPair('Fvalue', 'Hello');
  Memo.Lines.Add(o.ToJSON);
end;

works and displays a string of {"Fvalue":"Hello"}

I'[m not fussed about the 1st one as long as the 2nd option doesn't cause a memory leak. I'm assuming that under the hood, javascript is reference counting the TJsonString and releases it when the reference count reaches 0.

Can you confirm this ?

We traced & solved this issue. The next update will address this.

Thanks Bruno :slight_smile:

Any idea when the next release is likely ?

There is not an ETA yet. Priority is to release now TMS WEB Core for Visual Studio Code v1.2. After this release, regular updates will be released again.
If you want an urgent incremental fix, contact us by direct email support.