Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#12872 closed defect (wontfix)

Invalid Content within JSON files

Reported by: lazaridis_com Owned by:
Priority: high Milestone: tbd
Component: General Version:
Keywords: Cc:
Blocked By: Blocking:

Description

This affects Examples, Tests & Documentation.

Many *.json files within the dojo sources do not contain valid JSON data.

This files should be change to have the names (keys) within " "

{ id: 'CN', name:'China', type:'country' }

becomes:

{ "id": "CN", "name": "China", "type": "country" }

Alternatively, those files could be renamed to e.g. *.jsd (Java Script Data) or something similar, in order to distinguish them clearly from JSON data files.

Related Discussion:

http://dojo-toolkit.33424.n3.nabble.com/Dojo-usage-of-non-standard-JSON-Format-td2878366.html

Change History (5)

comment:1 Changed 9 years ago by bill

We'd be happy to take a patch to make those files proper JSON format, although you'd first need to file a http://dojofoundation.org/about/cla.

comment:2 Changed 9 years ago by lazaridis_com

Patching the nearly 500 files is inefficient and critical. A core developer could provide an utility function, which loads the js and then saves it back as json. Or with a regex, to keep formatting.

And then, each developer can convert his files and see if something breaks.

(As for me: I'm aware about the contribution mechanisms, but I have limited time and resources, and the time has not yet come for me to touch the repo, even not indirectly via patches.)

comment:3 Changed 9 years ago by bill

Resolution: wontfix
Status: newclosed

OK, I don't think any core developers are interested in doing that. I'm going to close this ticket as wontfix but if someone wants to work on it they can reopen it.

Probably for 2.0 we'll change dojo.xhr() to do strict parsing at which point we'll update the files which need updating.

comment:4 Changed 8 years ago by bill

In [27562]:

fix invalid json in dijit, refs #12872 !strict

comment:5 Changed 8 years ago by lazaridis_com

Shouldn't this be reopened?

Note: See TracTickets for help on using tickets.