Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to parse node.js REST api object in ActionScript3

How to parse node.js REST api object in ActionScript3

Problem

I have node.js REST api, which returns following object

[
       {
           "word": "word"
       },
       {
           "word": "ability"
       },
       {
           "word": "about"
       }
]

Can someone please let me how to parse this object in ActionScript3 SDK4.6

Thanks in Advance!!!

Problem courtesy of: Swati

Solution

JSON parsing is included in the default package.

var json:Object = JSON.parse("[{\"word\": \"word\"},{\"word\": \"ability\"},{\"word\": \"about\"}]");

Default JSON parsing is much higher performance than as3corelib implementation.

Solution courtesy of: Jason Sturges

Discussion

View additional discussion.



This post first appeared on Node.js Recipes, please read the originial post: here

Share the post

How to parse node.js REST api object in ActionScript3

×

Subscribe to Node.js Recipes

Get updates delivered right to your inbox!

Thank you for your subscription

×