Parsing dynamic JSON in Android

后端 未结 3 838
遥遥无期
遥遥无期 2020-12-03 23:17

I have a json Object is like this:

{
    Yg7R_: {
    fld_invoice: \"Yg7R_\"
    fld_order_id: \"5\"
        fld_orders: {
            4: {
                f         


        
3条回答
  •  盖世英雄少女心
    2020-12-04 00:11

    You don't have any JSON arrays in there. YOu only have JSON objects. You need to use getJSONObject instead. Arrays are surrounded by [] and may have multiple unnamed objects separated by commas. Objects are surrounded by {} and have a single value with a single name.

提交回复
热议问题