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
Post a Comment