Hello,
I have a set of JSON responses from JACKSON (a High-performance JSON processor
Java library) and all are fine. Next I have to append all using comma and put them enclose all of them inside the square bracket
BUT some unusual response is coming
1. It is removing the comma in between
2. It is converting the closing curly brackets to square brackets.
The individual correct responses are
{"agentId":"embedded","cacheManagerName":"MyStandAloneCacheManger","name":"2.8.0_preview-SNAPSHOT","version":"MyStandAloneCache1"}
And
{"agentId":"embedded","cacheManagerName":"MyStandAloneCacheManger","name":"2.8.0_preview-SNAPSHOT","version":"MyStandAloneCache2"}
And post appending the above two, the CORRECT output should look like
[{"agentId":"embedded","cacheManagerName":"MyStandAloneCacheManger","name":"2.8.0_preview-SNAPSHOT","version":"MyStandAloneCache1"},
{"agentId":"embedded","cacheManagerName":"MyStandAloneCacheManger","name":"2.8.0_preview-SNAPSHOT","version":"MyStandAloneCache2"}]
BUT post Stringbufffer appending its coming like as shown below
[{"agentId":"embedded","cacheManagerName":"MyStandAloneCacheManger","name":"2.8.0_preview-SNAPSHOT","version":"MyStandAloneCache1"]{"agentId":"embedded","cacheManagerName":"MyStandAloneCacheManger","name":"2.8.0_preview-SNAPSHOT","version":"MyStandAloneCache2"]
Please suggest whats wrong is happening here.
Also suggest some other means of appending the two JSON responses.
Thanks,
Faraz