Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6237873
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T11:06:42+00:00 2026-05-24T11:06:42+00:00

I want to parse JSON string to some my custom object in Action script

  • 0

I want to parse JSON string to some my custom object in Action script 3. Is there some libs to do this. Or any ideas how can I make this. Thanx!

Here is an example what I want to receive:

{
    "result":{
        "birthday_at":"0000-00-00",
        "first_name":"Myname1",
        "level":5,
        "last_name":"MySurname",
        "gender":0
    },
    "cmd":"INFO",
    "service":{
        "code":0,
        "error_desc":""
    }
}

and class UserInfo:

public class UserInfo
{
  public Date birthday_at;
  public String first_name;
  public String last_name;
  public int level;
  public int gender;
}

And I want, to parse JSON string to fields of my class? How can I do this in an easiest way and in a right way? Thanx!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T11:06:43+00:00Added an answer on May 24, 2026 at 11:06 am

    Using the class mentioned in the previous answer, you would simply need to do the following:

     var obj:Object = JSON.decode( jsonString );
     var user:UserInfo = new UserInfo();
    
     for ( var prop:String in obj )
        user[prop] = obj[prop];
    
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to parse this JSON string using Gson {name:name,type:[a,b,c]} is it possible? 1st
I have a piece of JSON string, which I want to parse in Erlang.
I want to receive a JSON object using Ruby. I've written this: require 'sinatra'
I want to parse JSON arrays and using gson. Firstly, I can log JSON
I want to parse some JSON data. I'm using James Newton-King's JSON.NET library .
I want to parse the JSON string below into an associative array, sort it
I'd like to be able to parse a string of JSON representing an object
I want to parse some HTML in order to find the values of some
I want to parse a filter string similar to the following: ((Field1 = 'red')
I want to parse the input string and extract the values from it. My

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.