[fpc-devel] JSON Beautifier

theo xpde at theo.ch
Fri Sep 24 13:08:06 CEST 2010


> Have you tried the JSONVIewer app  in Lazarus ? tools/jsonviewer ?
> It displays (and allows to manipulate) the JSON in a completely graphical
> manner.

Now I had the time. Looks great! Thanks for this.
(I had to copy the json files from FPC trunk, it didn't compile with my 2.4 because of "Extract")


> I'm already working on a formatted JSON call, but I'm not yet there.

This would be great for debugging using ShowMessage or writeln.
Any idea when this feature will be ready?


I have another question.
What exactly is the purpose of TJSONNull in fpjson?

In Javascript, i can do sth. like:

var myJSONObject = 
{
  "Name": "test",
  "testDate": null
};
alert(myJSONObject.testDate);
myJSONObject.testDate=Date();
alert(myJSONObject.testDate);

Which I understand as: "There is no date assigned initially, but this can be changed".
I can't figure out how to do this with fpjson. except probably deleting and adding the value/type.

Thank you
Theo





More information about the fpc-devel mailing list