Hi there everyone,
I am using Visual Planit and its VpJSONDataStore to create a JSON agenda. VpJSONDataStore reads the JSON file from the disk but since my data comes from a remote server, I am compelled to save it to disk first before the VpJSONDataStore can read it.
Here is the code I use to create the
data.json file:
//
AStream := TMemoryStream.Create;
//
try
AStream.WriteAnsiString(Trim(AData)));
AStream.Position := 0;
AStream.SaveToFile('data.json');
finally
AStream.Free;
end;
The problem is that the
data.json file created has some extra characters at the beginning of the file (see RED ARROW in the screenshot). I am certain that the JSON is correct in the AData string variable.
Does anyone know how I can correct this problem?
Thanks,
JD