Convert JSON String to Java Object or HashMap
Posted
by Priyank
on Stack Overflow
See other posts from Stack Overflow
or by Priyank
Published on 2010-03-31T14:00:41Z
Indexed on
2010/03/31
14:03 UTC
Read the original article
Hit count: 368
Hi.
I am writing an android app. I want to pass some data across the intents/activities and I feel that a conversion to and from JSON is probably a more optimal way at this point. I am able to convert a java hashmap to a json string successfully using JSONObject support.
However i need to convert back this JSON string to a java object or a hashmap. What is the best way to go about it.
Is parcelable really a change worth doing; if I have simple 5 field object? What are the other ways to transfer data between intents.
Cheers
© Stack Overflow or respective owner