I'm working on a project that save/retrieve JSON-type string to a database.
Everything works ok, i.e., save and update is safe for types String,Number and Boolean
, but for List and Map
, I want to see what is the safe way to manipulate List and Map when the data comes back and forth the database especially when items on the list become large, i.e thousands of items, say for list of "friends" and "followers"
I am also concerned with potential data corruption when processing the a JSON List
or Map
in Java.
What is the safe way to update a List and Map using JSON.Simple
library while not loading everything (every item) in memory.
For example I just need to insert one (1) item in a JSON list string that is stored in a database.