My JSON will be as follows:
{
"id" : "1",
"data" : "aaaaaaaaaaaaaaaaaaaaa"
}
I am ready to use any JSON Parser. But I want the data element as InputStream.
Could you please me to implement the same in Java?
My JSON will be as follows:
{
"id" : "1",
"data" : "aaaaaaaaaaaaaaaaaaaaa"
}
I am ready to use any JSON Parser. But I want the data element as InputStream.
Could you please me to implement the same in Java?
Use GSON or JSON from maven Repository it's simple to use and nice , If you need to create test project use JSON library and if you need to use for heavy Json or Parse to Object use GSON library. if you need to write JSON to file that's not about json library , if you need to read json format from input stream in this case both of them can help you. check this question : Convert InputStream to JSONObject