2
{"Freedom Plan 4900":
    {
    "sale_price1":["$10.00","$20.00","$25.00","$50.00","$100.00"],
    "loc_rate1":["India (2.0¢ per min)"],
    "net_minutes1":["500","1,000","1,250","2,500","5,000"],
    "loc_rate":["India - Mobile (1.5¢ per min)"],
    "net_minutes":["666","1,333","1,666","3,433","6,866"]
    },

"Super Offer Plan":
    {
    "sale_price1":["$10.00"],
    "loc_rate1":["India (1.5¢ per min)"],
    "net_minutes1":["667"],
    "loc_rate":["India - Mobile (1.0¢ per min)"],
    "net_minutes":["1,000"]
    }

}

i want to parse this json string

1
  • I am completed this how to do Commented Apr 27, 2012 at 8:49

1 Answer 1

1

I would use something like GSON:

http://sites.google.com/site/gson/gson-user-guide

Create classes to hold the data (e.g. PhonePlan etc) and let GSON parse the JSON string.

PhonePlan plan = gson.fromJson(json, PhonePlan.class);
Sign up to request clarification or add additional context in comments.

1 Comment

how will gson be able to parse the dynamic key?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.