Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Trying to merge two JSON objects in android

 
achuthan mukundarajan
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to merge two json objects in android using the following piece of code:





The resulting merged JSON should contain 5 pieces of data.But one of the piece of data is missing.What am i doing wrong in the above piece of code?
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see neither JSON nor anything Android-specific in this code. Please provide much more detail about what this code is doing, and what you were expecting it to do instead.
 
achuthan mukundarajan
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I modified the code as


 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, and when you run this code you get what? and you expected what?
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!