Passing JSONObject into another activity

后端 未结 7 1823
情歌与酒
情歌与酒 2020-11-30 04:56

I\'m hitting an external API that\'s returning JSON data (new dvd titles). I\'m able to parse out the JSON and list each dvd title and other dvd information into a ListView

相关标签:
7条回答
  • 2020-11-30 05:27

    You can simply put an entire JSONObject as a string. Something like this:

    i.putString("product", jsonObj.toString);

    And then in the MovieProductActivity you could

    JSONObject jsonObj = new JSONObject(getIntent().getStringExtra("product"));

    0 讨论(0)
提交回复
热议问题