Reputation: 3
Now, I try to link that fullcalendar in jQuery UI and Database(Oracle 10g). But, a problem has occurred.
I want to parse that JsonArray from String of JsonArray format.
ex)
String of JsonArray format
-> String jsonArrayStr="[{test1:'test',test2:2,test3:'test3'},
{test1:'test',test2:2,test3:'test3'},
{test1:'test',test2:2,test3:'test3'}]";
String of JsonArray format->JsonArray
->JSONArray jsonArray = **(?)**
How you can convert JsonArray from String of JsonArray format in Java?
Upvotes: 0
Views: 5456
Reputation: 2607
You are confusing me with your tags: "java" and "jquery", did you mean "JavaScript"? Because Java has no relation with jQuery....
If you mean JavaScript, this may be your solution:
var jsonArrayStr = "[{test1:'test',test2:2,test3:'test3'},{test1:'test',test2:2,test3:'test3'}, {test1:'test',test2:2,test3:'test3'}]";
var jsonArray = JSON.parse( jsonArrayStr );
If you mean really Java, try the following code:
JSONArray jsonArray = new JSONArray(jsonArrayStr);
Dependencies:
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
Upvotes: 0