Use org.json.JSONObject.

On Thu, Apr 7, 2011 at 1:35 AM, Er. syed imran ali <[email protected]> wrote:
> Hi all,
> In one of my application i have been getting big json that i have to
> parse,
> in that i have one part there is dynamic json tag, so can you please
> help to
> parse it in proper way.
> i am providing simple code so, that you can under stand problem.
>
> {"recipeRows":[{"amountFormatted":"300","ingredient":
> {"name":"mandelmassa, grovt riven"},"unit":{"id":10}},
> {"amountFormatted":"1","ingredient":{"name":"äggvita"},"unit":{"id":
> 1}},{"title":"Fyllning:"},{"amountFormatted":"100","ingredient":
> {"name":"smör"},"unit":{"id":10}},{"amountFormatted":"1","ingredient":
> {"name":"florsocker"},"unit":{"id":8}},
> {"amountFormatted":"2","ingredient":{"name":"vaniljsocker"},"unit":
> {"id":4}},{"amountFormatted":"1,5","ingredient":
> {"name":"kakao"},"unit":{"id":4}},{"title":"Glasyr:"},
> {"amountFormatted":"125","ingredient":{"name":"mörk choklad (70 %)
> finhackad"},"unit":{"id":10}},{"amountFormatted":"1","ingredient":
> {"name":"smör"},"unit":{"id":5}}]}
>
> the above code is my json and i have to parse, the problem is here
> that, in the reicpeRows, some member has only "title". it has either
> "title" or reset other structure. so this is my problem to parse.
>
> Thanks
> S.I.ali
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to