Opened 16 years ago

Closed 15 years ago

#1889 closed defect (fixed)

dojo.json.serailize does not produce YAML compatible JSON

Reported by: guest Owned by: Dustin Machi
Priority: high Milestone: 0.9
Component: Data Version: 0.4
Keywords: Cc:
Blocked By: Blocking:


JSON is nearly a strict subset of YAML (and this is by design at this point ). One sticky point is that YAML requires spaces after , and : in the object notation (due to it's grammar). It would be nice if this was at least an option for dojo.json.serialize(). Ideally, it would just be done that way always, but I could imagine someone will want to have the more compact form. Other than hacking the source, it can't easily be done done because arrays are intercepted before the Adapter registry is examined. Fix requires using ", " in the array loop and ", " and ": " in the object loop.

rbunker at

Change History (2)

comment:1 Changed 15 years ago by dylan

Milestone: 0.9
Owner: changed from skinner to Dustin Machi

comment:2 Changed 15 years ago by Dustin Machi

Resolution: fixed
Status: newclosed

(In [8992]) update json serializer to produce yaml compliant output. also fixed dependent xhr test. fixes #1889

Note: See TracTickets for help on using tickets.