Opened 9 years ago

Closed 3 years ago

#11305 closed defect (patchwelcome)

stack overflow from dojo.fromJson during de-serializing of JSON into javascript object

Reported by: sdatta Owned by: Kris Zyp
Priority: high Milestone: 1.13
Component: Dojox Version: 1.4.2
Keywords: dojo.fromJson reference Cc:
Blocked By: Blocking:

Description

if there is a circular reference and the "id" has a fragment, then dojo.fromJson throws stack overflow. Here is the example: var data = '[ {"name" : "aFather","id" : "http://mysite.com/rdf/mymodel.rdf#aFather_id","son" : {"$ref" : "http://mysite.com/rdf/mymodel.rdf#aSon_id"}}, {"name" : "aSon", "id" : "http://mysite.com/rdf/mymodel.rdf#aSon_id","father" : {"$ref" : "http://mysite.com/rdf/mymodel.rdf#aFather_id"}} ]';

var object = dojox.json.ref.fromJson(data);

Change History (2)

comment:1 Changed 9 years ago by Adam Peller

Owner: changed from Adam Peller to Kris Zyp

comment:2 Changed 3 years ago by dylan

Milestone: tbd1.12
Resolution: patchwelcome
Status: newclosed

Given that no one has shown interest in creating a patch in the past 5+ years, I'm closing this as patchwelcome.

Note: See TracTickets for help on using tickets.