Tagged Questions

jsonarray is the array of elements in json format. JSON is the light weight communication medium across multiple cross platforms.

learn more… | top users | synonyms

0
votes
1answer
21 views

Iterating through JSONArray in JSP using JSTL

I am sending a list of custom objects with model, and a JSP as a view. My custom object has a property called properties and it is JSONObject. This property will have the value as ...
0
votes
2answers
15 views

Create a Json array in a for loop - php

<?php include '../connection.php'; $sql="SELECT userid,name,batch FROM dbusers"; $results=mysql_query($sql) or die("Cannot execute query"); $count=mysql_num_rows($results); $arr=array(); for($i=0; ...
0
votes
0answers
42 views

How to use serialization on a JSONArray?

I'm loading information from a JSON-file and if there's no network connection, I want to show the latest updated version which is saved in a serialized file. klassen is a JSONArray and I know that a ...
1
vote
1answer
45 views

com.google.gson.JsonObject cannot be cast to com.google.gson.JsonArray

I have some trouble with parsing a JSON response. The response data: { "deal": { "categorie": { "description": "Offres Shopping", "idcategorie": "1", ...
2
votes
2answers
36 views

Extra numbers appearing after JSONArray creation

I'm creating a JSONArray with javascript, and something strange happened to my new Array: var arrayfinal = new Array(); //Order array by elements function SortByPuntuation(x,y) { return ...
0
votes
1answer
59 views

hosting a wamp database on www.000webhost.com, showing jsonparsing error in android

I am done with my time table application where in time tables are stored in wamp server,and my android app shall fetch the tables and save them in sqlite DB on android.I used Jsonparsing to get the ...
0
votes
0answers
57 views

NullPointerException while creating JSONObject in jsp

<%@page import="java.io.PrintWriter"%> <%@page import="java.sql.*"%> <%@page import="javax.servlet.*"%> <%@page import="javax.servlet.http.*"%> <%@page ...
0
votes
2answers
72 views

Application suddenly stopped POSTing to DB, returning Status Code 406

My Application makes calls to our server through a couple different Asynctask's, it pulls data twice and finally sends a JSONArray through POST. It had been working properly but recently stopped, no ...
0
votes
1answer
33 views

postgis with ruby on rails query multipolygon

If i make a query on my postgis database to get my districts, i get the following returned for my LatLon column: SELECT id, ST_AsText(latlon) AS geom FROM district; MULTIPOLYGON(((16.4747103091463 ...
0
votes
1answer
91 views

Parse complex JSON object with Jackson

I need to parse relatively complex JSON with Jackson library. Could you guys advice what Java class structure should I have and what Jackson approach to use to parse the following JSON object. It is ...
1
vote
1answer
31 views

Android: How to get JSONArray string in different variables

I'm building an application in which I'm consuming server side JSON data in ["anything","everthing"] this format. I'm trying to store both strings into different different variables, I have tried ...
0
votes
1answer
100 views

how to parse json array using Litjson?

I am developing an application in which i am using data came from server in the json format. However i am able to parse normal json data but failed to parse the json data with arrays, the json ...
0
votes
1answer
39 views

How to deserialize my json into class?

My Json String: {"Result":[{"branch":"61","food":"Idli","food_photo":[255,216,255,22,....55,217],"preparation":"23","qty":"Pcs"}]} My Quest:1)When i deserialize i got null food_photo in my list. ...
0
votes
1answer
62 views

getting json byte array in list

I got null value for byte array in json web service when deserializing.but it returns byte array when invoked from browser. C# Code: var url = ...
2
votes
3answers
83 views

JSON array string to JSONArray Object in Java

I'm new to JSON manipulation in Java and I have a String in the form of a JSON Array with several layers I need to access and put into class attributes. For example, here's my JSON object: ...
0
votes
2answers
113 views

How to convert this json array into list

My json Array: {"lstResult":[{"food_photo":[255,216,255,224,0,16,74,70,73,70,0,1........3,5],"food":"12","qty_uom":"Pcs","unit":null}]} my C# class: public class lstresult { public ...
0
votes
2answers
143 views

Trouble in getting JSONObject to String Array Value

Hi i am having trouble to get the JSONObject value title and store into the array. public class ViewPagerAdapter extends PagerAdapter { // JSON Node names private static final String ...
2
votes
1answer
138 views

Ajax jquery with JsonArray in JSP

I'm using JSon-RPC library. Servlet: I want to put List<Student> into JSonArray that is the same as {["name":"AAA","age":"24"]["name":"BBB","age":"12"]}. JsonArray have a contructor that ...
1
vote
2answers
89 views

JSONX to JSON transformation

I have some XML data dumped from my database and I need to re-format it into JSON. I am using an IBM DataPower database, so I actually need to transform that XML to JSONx and then use IBM's default ...
0
votes
2answers
32 views

JSON parse objects with same string name

Fast question, here is my Json: { "items": [ { "id": "4cd8fe75d", "name": "foo" }, { "id": "5076c7e30", "name": "bar" ...
0
votes
0answers
55 views

gridview from mysql and JSONArray Android

I need help in adapting this code and receiving an array but with the conditions that prompted (forgive my language, google translator) For example: I receive this data only Array: imei = '35 ' My ...
5
votes
3answers
311 views

How to pass JSONArray From Activity to Html Script?

I want to pass JSONArray From Activity to HTML Script I am trying in the below way but i'm unable to get the data in the HTML Activity:- public class DayViewJSActivity extends Activity { ...
0
votes
0answers
48 views

How to insert all records into SQLite using JSONArray?

I want insert all records of result in SQLite. and result showing records like this [{"nome":"A BARATEIRA DE TECIDOS LIMITADA ME"}] [{"nome":"A BARATEIRA DE TECIDOS LIMITADA ME"},{"nome":"A.A.L. ...
0
votes
1answer
65 views

Get Elements from a JSONArray when the elements got no name

i have google it all day and it looks like I'm the only one who has this problem (strangely?) Well i have this "genres": [ "Animation", "Kids & Family", "Science Fiction & Fantasy", "Comedy" ...
1
vote
1answer
97 views

json array to class

i have this json array response: [ { "status": "active", "url": "https:\/\/ikiosk.podio.com\/dev\/apps\/myusers", "url_label": "myusers", "space_id": 550628, "link_add": ...
2
votes
2answers
192 views

Parsing JSON from HTTPResponse

My JSON looks like this- {"ipinfo": { "ip_address":"4.2.2.2", "ip_type":"Mapped", "Location":{ "continent":"north america", ...
0
votes
2answers
225 views

How to convert JSON formatted string of data rows of a table in to java array in android

I have a JSON string like this of data for a table in an android app. one of {} is a row of data for the table. I want to separate these {}s into an array and then each element inside this array into ...
0
votes
1answer
202 views

C# JavaScriptSerializer json array deserialization

Code: string json = "[{\"Name\" : \"dan\", \"Age\" : 25, \"City\" : \"lllal\", \"About\" : \"im dan\", \"Bdate\" : \"26/06/1997\"}]"; JavaScriptSerializer ser = new JavaScriptSerializer(); ...
1
vote
1answer
77 views

JSONObject and JSONArray - Need to get values held in array

I have the following JSON data structure: { "myRequest": { "item1": "value1", "itme2": "value2", "item3Holder": { "id": [ "ID001", "ID002", "ID003", ...
1
vote
0answers
98 views

Trouble retrieving data from web service using GSON

I have tried a lot of samples and tutorials about GSON and how things would work using it such as: http://www.softwarepassion.com/android-series-parsing-json-data-with-gson/ ...
0
votes
1answer
48 views

htaccess and its usage to allow access of a url to android user using my application

I am a newbie for this security purpose and php files I came to know about htaccess when i saw my files and databases are not secure. I am filling listview in Android application from JsonArray ...
0
votes
2answers
188 views

Why does my JSON-Simple JSONArray give me a nullpointer exception?

I'm following this tutuorial here, and my JSON object is near enough the same, except I have this sort of format: {"user":{ "SomeKeys":"SomeValues", "SomeList":["val1","val2"] } } Here ...
-1
votes
4answers
217 views

how to parse JSON response

I am working on an application in which I get JSON response. The response is as below: [ { "CID": 5, "ChildMenus": [], "Level": null, "MenuUrl": "", ...
0
votes
1answer
192 views

Joining a JSONArray adds double quotes to the string in groovy

I have grails app that makes a REST call. If an error occurs, a JSON array containing the error messages is returned. I need to combine these strings into a single string. However, when I do so double ...
-1
votes
2answers
249 views

How to convert JSON response to string in Android? [closed]

Possible Duplicate: JSON Array iteration in Android/Java I am developing an app where i am using the following JSONWeb Services Code. Everything is working good and getting response as JSON ...
0
votes
0answers
128 views

A JSONArray text must start with '[' at character 5 of

I have a problem parsing using JSONArray My Log error is 09-07 16:00:23.516: E/log_tag(216): Error parsing dataorg.json.JSONException: A JSONArray text must start with '[' at character 5 of My ...
1
vote
1answer
140 views

How to stop Runnable thread activated by onScrollListener?-Android

I have edited my question.The reason why i edited my question is that no matter what i do thread was fetching all the items from the database.Retrieving few rows of data would not have been problem ...
1
vote
3answers
527 views

Difference between JSONObject and JSONArray

After having a short look at Google I found this link that describes the difference, yet from a syntax point of view. When would one be preferred over the other in a programming scenario?
0
votes
0answers
87 views

Android: Facebook JSON only returning 57 results every time

Despite the fact that going to https://graph.facebook.com/me/friends?fields=name,email,username,installed&access_token=.... works perfectly, the java code below only returns 57 results and then ...
0
votes
2answers
508 views

How to check if JSONArray Element is null

I can't figure out how to determine is an element that lives inside a json array is null. To check if the jsonObject itself is null, you simply use: jsonObject.isNullObject(); But when the object ...
1
vote
3answers
122 views

Find the value of specific element satisfying condition from json array [closed]

Friends I have following like json array [ { "Rate":100.0, "MaterialID":"BOLT", "BrandName":"", "Description":"", "Unit":"KG", "TokenNumber":2 }, { ...
14
votes
5answers
662 views

get array of KEYS for each element under jsonarray

I want to parse my Json array dynamically. and want to get array of KEYS for each element under jsonarray. i an getting this through iterator. but not getting the sequeance as per the output json ...
0
votes
0answers
32 views

Not able to stop the loop started by OnScrollListener

I tried to implement Endless ListView but im not able to stop the loop which adds elements to the ListView even after there are no more elements in my JSON Array.Intially i have 10items in the ...
1
vote
2answers
843 views

Add JsonArray to JsonObject

I googled a lot today for this subject. But I can't find it, How can I add a JSONArray to a JSONObject? Because everytime I do this I get this error: Stackoverflow JSONObject ...
1
vote
3answers
285 views

JSONArray is empty

I read data from a database (only the last row, I do it in my php file) what I want to do is to use the data of each field separately but the problem is that the JSONArray is empty I tried a lot of ...
0
votes
0answers
45 views

Problems parsing JSON

When communicating with my server, and it communicates with JSON in http headers. An example of the JSON is: { "key": { "kind": "person", "id": 4001 }, "propertyMap": { ...
0
votes
1answer
285 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
299 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
0answers
26 views

Alternative to ListView when accepting & displaying JSONArray values from PHP to Android

Is there any other options to accept JSON Array values from PHP to Android? I want to make my own layout, and not the usual layout that ListView has. Thanks.
3
votes
1answer
391 views

Android: using jackson to parse JSON object by object

I want to access data from a database in my android app. For this, I'm using a PHP webservice and JSON format data. When I ask the webservice for data, I get something like this: {"products": [ ...

1 2 3 4
15 30 50 per page