Questions tagged [jsonreader]
114 questions
2
votes
1 answer
Using a custom JSON format for jqGrid
I have a JSON file that must be formatted as follows. How can I have jqGrid interpret this format using the jsonmap, colModel, or jsonReader options?
[
{
"element1" : {
"subElement1" : "value",
"subElement2" : "value"
}
…

Donald T
- 10,234
- 17
- 63
- 91
2
votes
0 answers
.NET Core - JSonReaderException Error reading Jobject from JsonReader
I'm developing an application with the ASP.NET core Framework and Visual Studio keeps coming up with the error message:
System.FormatException: "Could not parse the JSON file. Error on line number '10':*/'." JsonReaderException: Error reading…

Coziac
- 29
- 4
2
votes
0 answers
ERROR: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path $
I am getting following error while opening android studio existing project first time ERROR: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path $
I am getting this error in android 3.3.1
My Project Build…

Dharmesh Dhameliya
- 108
- 2
- 10
2
votes
1 answer
Reading a JSON file in order
I have this json file that have a map of key-value pairs, but each value is a list of values
{
"car":["BMW", "AUDI"],
"OS":["Mac", "Win", "Ubuntu"],
"food":["Burger", "Taco"]
}
I need to read them in a java class and convert this…

MSOUFAN
- 101
- 2
- 12
2
votes
1 answer
JsonReader don't parse correctly String Array
I'm using JsonReader from gson, for parsing JSON, my JSON parsing is fine for all value except this one :
"tags": [
"String1",
"String2",
"String3",
"String4"
],
This is the code for parsing
…

Vodet
- 1,491
- 1
- 18
- 36
2
votes
2 answers
JsonReader - reading an array throws Expected a name but was NULL
I'm using JsonReader to parse some JSON data. It's a big array of elements of similar structure:
[
{
"type":"duel",
"discipline":"leagueoflegends",
"tournament_id":"57ee13fe140ba0cd2a8b4593",
"opponents":[
{…

paolostyle
- 1,849
- 14
- 17
2
votes
0 answers
Retrieve information from JSON file properly using JSONReader in PHP
I am trying to retrieve information from a JSON file using JSONReader (I've implemented JSONReader to my PHP configuration) and I am trying to get the information from a simple JSON file (see below) about the whole part of the array (part, where…

Tomas
- 21
- 2
2
votes
2 answers
Gson: Custom deserialization if certain field is present
I have a class that looks as follows
class Person {
Long id;
String firstName;
int age;
}
and my input either looks like this:
{ "id": null, "firstName": "John", "age": 10 }
or like this:
{ "id": 123 }
The first variant represents a…

aioobe
- 413,195
- 112
- 811
- 826
2
votes
1 answer
Android JsonReader can't iterate json array
I'm playing with JsonReader which is a streaming JSON parser in Android, and I met a problem that the parser won't go over all the items in an json array, it will only return me the first item.
Here's the code I use to do the parsing:
private…

dumbfingers
- 7,001
- 5
- 54
- 80
2
votes
1 answer
jqGrid from USGS geojson data
I'm trying to read and post in a jqGrid a set of earthquakes GeoJSON data extracted from USGS repository.
The request is accepted, but displays "Uncaught SyntaxError: Unexpected token" when probably meets the header metadata.
$(function () {
…

user2190221
- 23
- 2
2
votes
2 answers
jqgrid jsonReader configuration
I'm new to jqgrid finally i've setup a grid. Suppose i need to setup jsonReader so that the grid knows where to get my grid-data in the json return. However i got blank cells after trying for days.
Here is my grid:
jQuery("#list48").jqGrid({
…

user2045340
- 25
- 1
- 5
2
votes
2 answers
1
vote
3 answers
Loading JSON data in jqGrid
I'm having troubles when showing my json data in jqGrid.
I've searched a lot in this forum and tried various forms to make it work. I apologize if this was already answered but I really need help with this one.
At the server page I was only using…

fabianmunoz
- 21
- 1
- 1
- 6
1
vote
1 answer
Jqgrid with jsonreader the userdata response in firebug is undefined
I am trying to access userdata I have sent from the server (using coldfusion) to filter the display of edit or add icons depending on users's role. Example of userdata value is "all" or "add" or "edit" or "view".
From firebug an example of userdata…

Sue
- 61
- 1
- 1
- 12
1
vote
1 answer
Alert with jqGrid error messages
I would like to get an alert when errors occur when loading my jqGrid table. For instance, when the jsonReader is not well configured, like when repeatitems is true instead of false, U can see in Firebug the error:
ccur is undefined
[Break On This…

user998692
- 5,172
- 7
- 40
- 63