Questions tagged [jsonreader]
104 questions
17
votes
3 answers
How do you parse a JSON file using JSON.net
I am trying to read a JSON file and parse it. I have this code for reading from my file
StreamReader re = new StreamReader("artists.json");
JsonTextReader reader = new JsonTextReader(re);
But how do I parse it now from reader so I can search data…
![](../../users/profiles/972616.webp)
user972616
- 1,114
- 3
- 14
- 35
7
votes
4 answers
Using GSON do not parse a field, only keep it with the json raw string
Using GSON in Java is there any annotation where I can indicate a field that it should keep it as a raw string even though it is an object. ?
Or What would be the easiest way to achieve this?
//This is the original
@SerializedName("perro")
…
![](../../users/profiles/4322067.webp)
Kenenisa Bekele
- 675
- 8
- 29
6
votes
2 answers
Reading Large JSON file into variable in C#.net
I am trying to parse the JSON files and insert into the SQL DB.My parser worked perfectly fine as long as the files are small (less than 5 MB).
I am getting "Out of memory exception" when trying to read the large(> 5MB) files.
if…
![](../../users/profiles/1046415.webp)
user1046415
- 739
- 3
- 19
- 42
4
votes
1 answer
Loading a JSON file containing JSON within brackets
I'm trying to load a JSON file on a website using C# and JSON.Net
However, I'm running into a problem when it runs because all the JSON is within [].
Here's the…
![](../../users/profiles/1104783.webp)
user1104783
- 155
- 2
- 11
4
votes
1 answer
Handling Null Pointers from JsonReader
I am using JsonReader to fetch lots of data from a website and saving to a db. Incidentally, whenever the reader doesnt find a value for an object item, it fails and stops executing.
This is the error i have;
System.err﹕…
![](../../users/profiles/2371515.webp)
Alex Kombo
- 2,856
- 6
- 31
- 59
4
votes
2 answers
what's basic difference between JsonStore and JsonReader in context to Ext.data?
What's basic difference between JsonStore and JsonReader in context to Ext.data?
I mean when I should go for JsonStore and when I should use JsonReader as for me both are providing same solution.
![](../../users/profiles/144408.webp)
shahjapan
- 11,781
- 21
- 66
- 98
3
votes
1 answer
Convert value from JsonObject to BigDecimal
I'm a newbiew in java language.
I want to get a value from a JsonObject and convert it to BigDecimal.
I have the following code:
JsonReader jsonReader;
try {
jsonReader = Json.createReader(httpRequest.getReader());
} catch (IOException e) {
…
![](../../users/profiles/5148197.webp)
Ricardo Rocha
- 8,628
- 9
- 53
- 91
3
votes
2 answers
How to order and display json values in list, if some values are not unique and some are unique
{
places: [
{
id: 1,
place:"America",
name: "Robert",
age: "22",
place_lat: "10.017",
place_lon: "76.344"
},
{
id: 1,
place:"America",
name: "Albert",
age: "22",
place_lat: "10.017",
place_lon: "76.344"
},
{
id: 2,
place:"China",
name:…
![](../../users/profiles/5707271.webp)
Visal Varghese
- 389
- 3
- 13
3
votes
1 answer
android JSON reader - IllegalStateException; expected name but was string
I'm trying to use a Json Reader to parse through a .json file to insert records into my database but i'm having a problem reading through the file.
I intentionally opened the methods for parsing/reader with a try/catch clause so i can see what the…
![](../../users/profiles/2353483.webp)
Matthew White
- 189
- 3
- 11
2
votes
1 answer
Ext JS: Override JsonReader or post-process
A particular request to my server returns x fields of JSON. I want to combine several of these fields and insert the concatenated data into the x+1 field of my JsonStore.
I know how to process the load event, read each record, concatenate the…
![](../../users/profiles/213113.webp)
Upperstage
- 3,763
- 8
- 41
- 65
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"
}
…
![](../../users/profiles/717442.webp)
Donald Taylor
- 8,894
- 15
- 59
- 85
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…
![](../../users/profiles/11086286.webp)
Dharmesh Dhameliya
- 86
- 1
- 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…
![](../../users/profiles/5434264.webp)
MSOUFAN
- 91
- 1
- 10
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
…
![](../../users/profiles/4974176.webp)
Vodet
- 1,235
- 15
- 32
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":[
{…
![](../../users/profiles/1708094.webp)
paolostyle
- 590
- 4
- 14