0

I am new to java programming, I am not getting the right example for my below nested json object scenario, Here is my Json object which I have, how can I update the "stackoverflow" values 1 with 100 and 2 with 200 etc.

also stackoveflow is incremental json object it can be {} or {...}, in below i given size of 2 elements . how can I update/replace this jsonobject faster and efficient way without effecting other objects. Thanks Much

{
    "name": "sample",
    "stackoverflow": 
        {
             "one": {
                    "name": 1,
                    "type": "number",
                    "value":"onevalue"  
                },

             "two": {
                    "name": 2,
                    "type": "number",
                     "value":"twovalue" 
                },
        },
}
Rubia
  • 445
  • 2
  • 6
  • 17
  • I see JSON, but I don't see an implementation of a JSON Object. A JSON Object you should be able to call to update individual values, either with it being a Map or an actual Object. – Compass Nov 20 '18 at 19:03
  • Why don't you deserialize the JSON to object and then update the part that you want? – thanh ngo Nov 25 '18 at 04:41
  • https://stackoverflow.com/q/2591098/2280156 seems related – Mark S Dec 04 '18 at 17:48

0 Answers0