I wrote a JSON parser in Qt C++, which is kind of "poor man's Java".
The whole file, encode and decode, is 520 lines.  Basically you just
create a data structure that maps the JSON directly.  Here's the
"reference manual":

        // The jsonObject is a QVariant that may be a --
        // -- QMap<QString, QVariant>
        // -- QList<QVariant>
        // -- QString
        // -- integer
        // -- real number
        // -- bool
        // -- null (implemented as a QVariant() object)
        // Where QVariant appears in the above list, it may recursively
        // be one of the above.

QVariant is the Qt equivalent of "Object", to a first approximation.
The hardest part is probably cracking the JSON numeric notation --
that was 50 lines.

On Jul 14, 1:58 am, Sohan badaya <sohan.bad...@gmail.com> wrote:
> Hi,
> Is there any way to parse JSON object, that comes from facebook server
> in a response, into ArrayList or Map so that i can set values in my
> ListView.
>                      I am finding difficulty in parsing because JSON
> object itself contains JSONArray and this Array can contain JSONObject
> may be in recurcive order.
>
> Please suggest me any way to solve this problem.
>
> Thanks

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

Reply via email to