I have a JSON of following format
{ "a":"b" , "Content" : <Content of file FILEA> , "x" : y" }
and so on.
FILEA is too big that i cant open and load it to main memory. Is there any option where i can stream this json to a webservice without using much of main memory using Java.
For example , it would be awesome if there is something like writer = new JsonWriter(new FileWriter("user.json"));
writer.beginObject(); // {
writer.name("name");
writer.value("messagesPart1"); // "messages" :
writer.flush();
writer.value("messagesPart2"); // "messages" :
writer.flush();
writer.value("messagesPart3"); // "messages" :
writer.endObject();
}
And the content of user.json fie is
{ "name" : "messagesPart1messagesPart2messagesPart3"}