You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flex.apache.org by "Dan Lambourne (JIRA)" <ji...@apache.org> on 2019/08/16 15:43:00 UTC
[jira] [Updated] (FLEX-35405) JSON Stringify doesn't work with
filters as expected when classes are used as subobjects
[ https://issues.apache.org/jira/browse/FLEX-35405?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dan Lambourne updated FLEX-35405:
---------------------------------
Description:
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.
was:
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.
> 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
> Priority: Minor
>
> 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)