Reputation: 95
I declared an array as below
String[] finalcodes = new String[50] ;
and assigning some values to it finally when I print finalcodes it results as below.
["aaa","bbb","ccc"]
but my requirement is to get it as a json object
so please suggest me how to convert my string array to JSON Object.
Upvotes: 1
Views: 110
Reputation: 540
You can use jackson library also check your json is valid; http://jackson.codehaus.org/ / http://jsonformatter.curiousconcept.com/
Upvotes: 1