Hi

I am trying to use Jackson streaming API to update data in a JSON file. I 
want to achieve this without reading the entire file or creating a copy of 
the file. For example, I might want to update the age of index 2 below from 
40 to 20. I could read the entire tree, and then update the node and write 
the entire tree back. However, I am hoping to read each node and when I 
find index 1, update only that index and write in the same file without 
having to write the rest of the data.

Is it possible to achieve this using Jackson?


[
  {
    "index": 0,
    "age": 36,
    "name": {
      "first": "Hernandez",
      "last": "Rutledge"
    }
  },
  {
    "index": 1,
    "age": 40,
    "name": {
      "first": "Clarissa",
      "last": "Kent"
    }
  },
  {
    "index": 2,
    "age": 34,
    "name": {
      "first": "Carver",
      "last": "Melton"
    }
  }
]

-- 
You received this message because you are subscribed to the Google Groups 
"jackson-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jackson-user/742742b5-7539-4f7c-96e2-5db8e91e4b4c%40googlegroups.com.

Reply via email to