Delphi XE7: How to change a JSON value using System.JSON (versus SuperObject)
I need to load a JSON file, change a value and then write it back to disk. This is easy using SuperObject, but how do I do the same thing using the System.JSON unit? const PathToX = 'AllCategories.Category[0].subCategory[0].products[0].views.view[0].x'; var JsonFilename: string; JO: ISuperObject; // from the SuperObject unit JV: TJsonValue; // from the System.Json unit begin JsonFilename := ExtractFilePath(Application.ExeName)+'product.json'); // Using the SuperObject unit: JO := SO(TFile.ReadAllText(JsonFilename)); WriteLn('The old value of "x" is ', JO[PathToX].AsString); WriteLn('Changing