Skip to content

JSONR. parse() problems with deep structures? #4

@legikaloz

Description

@legikaloz

Try the following:

testObj= {
    a:1,
    b:2,
    nested1:{
        nested2:{
            nested2Key:11,
            nested2Data:22
        }
    },
    somearray:[1,2,3,4,5,6,7,8,9,10],
    someArray2:[
        {sample:1},{sample:2},{sample:3}
    ]
};
testObj.ref1=testObj.nested1;
testObj.ref2=testObj.nested1.nested2;
testObj.ref3=testObj.someArray2[1];

toStr=JSONR.stringify(testObj);

toObj=JSONR.parse(toStr);

toObj.ref3 will be undefined

Browser:Chromium 38

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions