Actionscript create a value object from Json -


i have large json file pass actionscript , want generate value object.

what best way of doing this? trying code:

    public function report(data:object)     {         if(data.score){             this.score = data.score;         }          if(data.title){             this.title = new object();             this.title.response = data.title.text;         }     } 

doing more 100 json property tedious. how can create value object json?

you can use json class' parse method, this:

var myjson:object = json.parse( data ); 

after myjson object common object data. no need in duplicate values 1 object another..


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -