Dan Lambourne created FLEX-35405:
------------------------------------

             Summary: JSON Stringify doesn't work with filters as expected when 
classes are used as subobjects
                 Key: FLEX-35405
                 URL: https://issues.apache.org/jira/browse/FLEX-35405
             Project: Apache Flex
          Issue Type: Bug
          Components: .Unspecified - Framework
    Affects Versions: Apache Flex 4.15.0
         Environment: Windows 10
            Reporter: Dan Lambourne


I have simplified what I was trying to do, but I was trying to follow a 
JavaScript example of JSON stringify using filters and in ActionScript I found 
that the following fails:-

{{           var myObject:Object = {}}
{{                num: 50,}}
{{                str: 'A string here',}}
{{                today: new Date(),}}
{{                ar: ['one', 'two', 'three'],}}
{{                obj: [new Point(2,1000),new Point(20,100)]}}
{{            }}}

{{            var json:String = JSON.stringify(myObject, ['today', 'obj', 'x', 
'y'] );}}

{{Yet changing myObject to the following works:-}}

{{            var myObject:Object = {}}
{{                num: 50,}}
{{                str: 'A string here',}}
{{                today: new Date(),}}
{{                ar: ['one', 'two', 'three'],}}
{{                obj: [\{x: 2, y: 1000},\{x: 20,y: 100}]}}
{{            }}}

It crashes using Point as it says Point doesn't have "today", yet neither does 
the object in the working line.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to