View Full Version : EXT Json vs Json.org format

26 Oct 2009, 12:46 PM
Hello all,

I'm fairly new to EXTJS & JSON so have that in mind please.

I have a question concerning JSON data format. I was writing a longer question and then realized I could "refactor" that more simply, so my question at large is:

Does EXTJS respect the JSON format outlined at http://json.org ?? Or perhaps is there an option somewhere to support that format?

It seems not, at least not with the tree example. Here's my longer question & example:

I'm using Java to generate JSON and there seems to be a difference in the JSON that EXTJS expects versus the "official" Json format at json.org. I tried two java libraries, which were suggested by json.org, to transform my objects into JSON text so I imagine these respect the "standard" JSON format if there's such a thing.

However it seems like EXTJS' format is different. I've checked the example JSON files included (for example in the tree examples, "check-nodes.json"). The arrays always include both [{ and the keys are not surrounded by the quote (") character.

Here's an example:
[output from java libraries]

{"text":"Ext JS"}

[json format which EXT JS can read, using my example above]

[{text:"Ext JS"}]

Thanks in advance!

27 Oct 2009, 5:28 AM
Ah ok turns out part of my question was due to my own noobness with JSON. So [{ is an array... And in fact it does support "" around keys, the example I was trying wasn't working for another reason.

Thanks anyways! You can mark this thread solved...