Tagged Questions
0
votes
1answer
15 views
Iterate JSONArray in Velocity Template
I am trying to iterate JSONArray in velocity template
but its not working
I found velocity template can iterate collection, array,hash-map objects
Anyone can help me to iterate JSONArray
Thanks in ...
0
votes
1answer
43 views
How to convert a Vector to JSONArray?
I need to convert a Vector<Vector<Float>> to a JSONArray. Apart from iterating through the vector and creating the JSONArray, is there any simpler way to do this?
Someone told me to try ...
0
votes
1answer
65 views
Parsing JSON ARRAY
I'm working on json parsing and I got a problem.
This is my JSON:
"cards":[
{
"id":"bgyr6gh5yr6154",
"checkItemStates":[
],
"closed":false,
"desc":"",
"due":"2012-06-13T10:00:00.000Z",
...
3
votes
1answer
61 views
Empty exception when converting inputstream to JSONArrary
I've an Android app that tries to consume a WCF service that returns a list of objects. The stream reads correctly, but throws an empty JSONException when trying to convert the string to a JSONArray. ...
2
votes
4answers
72 views
How can I fix this error java.util.ConcurrentModificationException
I get an error on the following line.
I'm doing the process of adding to the jsonarray.
Please help me.
jsonArr=new JSONArray();
if(req.getSession().getAttribute("userses")!=null){
String ...
1
vote
2answers
111 views
Converting Excel to JSON [closed]
I have read an excel document using apache-poi.
The excel document which have records like:
A1 A2 A3 A4
A1 A2 B3 B4
i want to convert them into JSON arrays like
{ A1 : {A2 : {A3 : {A4 : ...
0
votes
1answer
36 views
Scrolling on listview creates duplicate meta data items
I am populating the list view with data I am getting from a JSON Array.The meta data that I am getting is being duplicated when I scroll on the list view.
public View getView(int pos, View ...
0
votes
1answer
83 views
HashMap to JSONArray and handling the response in jquery
I have this HashMap< String,Employee>() object and I convert it to JSONArray as below
JSONArray jarray = JSONArray.fromObject(myHashMap);
Note that the key in the map is always a numeric literal ...
0
votes
4answers
108 views
How to parse a JSONArray of JSONObjects in JAVA?
I have the following array returned to my JAVA Android application from PHP:
Array ( [0] => Array ( [referral_fullname] => Name 1 [referral_balance] => 500 ) [1] => Array ( ...
1
vote
1answer
137 views
When trying to retrieve JSONObject out of JSONArray is returning null?
Im trying to do the following:
UserFunctions uf = new UserFunctions();
JSONArray json = uf.getAllFreebies();
System.out.println(json + "blah1"); //Here im able to retrieve the whole ...
0
votes
3answers
245 views
Deserializing multiple JSON-arrays of different types of objects in C#
I have a JSON-string with a fixed number of arrays of different objects (created in Java with JSONObjects and JSONArrays):
[
[ //The first type of object
{
"Initials":"MUS"
},
{
...
1
vote
1answer
187 views
Android, Parsing JSON object
When i call server its response is based of json object. Actually, I know how to parse JSON object but this response is strange for me. Server response is:
{"body":"Not ...
0
votes
0answers
60 views
How to return a JSONArray with large data?
I have created a JSONArray with 7000 records returned by the database.
This JSONArray has a JSONObject which has 8 String values.
On the server side I have calculated the time before returning the ...
0
votes
1answer
82 views
JSONArray and encoded image on Android tablet
I have a problem with my first Android App. I want to ask a PHP server for a name and image, using an cardid. This works well, but JSONArray throws an exception when I try to split up the long string ...
2
votes
3answers
233 views
Read an array of JSON in JAVA
I have a response like this:
[ { "key": { "kind": "UserRecord", "id": 0, "name": "1" }, "firstName": "1", "lastName": "1", "homeLat": 0.0, "homeLon": 0.0, "workLat": 0.0, "workLon": 0.0, ...
0
votes
6answers
354 views
How to convert a String into a JSONArray?
I'm attempting to save my array of players into a JSONArray, convert it to a string, place it into SharedPreferences then convert it back. The JSONArray I'm getting back when reloading my app with my ...
0
votes
1answer
155 views
JSONArray object not comming on JSP
I am stuck in this. please help me out.
I am using struts1.2. I have made JSONArray of JSONObjects in one of my form defined in struts-config.xml. I want to use this JSONArray on my jsp. I am not ...
1
vote
1answer
380 views
Parsing JSON array with gson
I am having trouble parsing my JSON which i get from javascript.
The format of JSON is this:
...
0
votes
1answer
334 views
Having trouble with getJSONObject method
I am trying to populate an adapter with information from my jsonArray. I have seen this done in many examples but I am getting an error that "The method getJSONObject(String) in the type JSONObject is ...
0
votes
0answers
58 views
Why does the JSONArray constructor removes some strings values and sets them as null?
I'm experiencing a problem when parsing a string to JSONArray object.
Here is the relevant part from the code:
try
{
BufferedReader reader = new BufferedReader(new InputStreamReader(is, ...
0
votes
1answer
228 views
Sertonin JSON: how to read a JSON array into a Java List?
Here is my code:
JsonReader reader = new JsonReader(readTwitterFeed);
List<Result> results = reader.read(new TypeDefinition(List.class, Result.class));
Result is a simple class with just one ...
0
votes
2answers
219 views
Parse json field that may be an JSONObject or JSONArray in java
I'm using the json.org library to parse my json. But I have a field called "messages" that depending on the number of messages may come as a null field, a JSONObject (if there is only one message) or ...
0
votes
1answer
184 views
csv file to JSONArray in android
NOTE: My specific problem is solved (explained at the bottom), but I'll leave my question up if any future visitors would like to contribute/look at this question.
Does anyone have any more efficient ...
0
votes
2answers
820 views
How do I remove a specific element from a JSONArray?
I am building one app in which i request one php file from server. This php file returns me one JSONArray having JSONObjects as its elements e.g.,
this
[
{
"uniqid":"h5Wtd",
...
1
vote
3answers
998 views
How to Create JSON Array in java
I have a JSON structure as given below, How to create this JSON Array structure programatically:
json srtucture
{
"Employee":
[
{
"EmP325235":
{
"Name":"Rekha_S",
...
2
votes
2answers
384 views
Error on constructing JSONArray from String
I am trying to construct a JSONArray from a String, and extract the JSONObjects from inside it. Here is my code:
String jsonStr = "[{\"name\" : \"John Doe\",\"gender\":\"male\",\"age\":40},{\"name\" ...
0
votes
2answers
252 views
How can I turn a JSONArray into a JSONObject?
Basically I have:
JSONArray j = new JSONArray();
j.add(new JSONObject()); //JSONObject has a bunch of data in it
j.add(new JSONArray()); //JSONArray has a bunch of data in it
And now I would like ...
1
vote
1answer
350 views
how to parse a jsonObject using JsonArray that have dynamic id's in start as integer
sorry but i amm not a player of Json it's my first time. so please tell me how can i parse a the following rsponse using jsonArray. As JsonObject need an string to return the the JsonArray but in my ...
0
votes
0answers
818 views
Why is this JSONObject not a JSONArray?
i am the following codes in javascript
var people = {
"users" : [{id : this.getJID().toString()},{id : this.getJID().toString()}],
"body" : messageBody
}
on my server end, I have the ...
0
votes
2answers
543 views
How can I parse this JSON and not get an exception?
I have the following JSON:
[
{
"outcome": "Success",
"message": "",
"identity": "",
"delay": "0",
"symbol": "AAPL",
"companyname": "Apple Inc.",
"date": "Jun 08",
...