Questions tagged [jsonreader]

114 questions
0
votes
1 answer

I am using JsonReader in Android, and i need a value inside the current object before parsing an inner object

My JSON object looks something like this: { id: 1 object: { object_id:1 key_for_1: "value for object type 1" } type: "object_type_1" } { id: 2 object: { object_id:5 …
Sree
  • 2,727
  • 3
  • 29
  • 47
0
votes
2 answers

I cant parse this JSON code, how could i do it?

I need help with this JSON parser. I have one container with comments which i want to get. This is the JSON string-code that i have: http://www.jsoneditoronline.org/?id=b73dc60acd235f60a647c02ed3e068db I need to get the atributes from each comment…
Aszur
  • 1
  • 4
0
votes
1 answer

JQgrid not showing data while rows are generating

Jqgrid is not showing JSON data, however rows are generating Server side code: public JsonResult Denominations() { . . int counter = 0; var jsonData = new { total = result.UserObject.Count, page = 1, rows = ( from p in result.UserObject …
Amod Chandra
  • 23
  • 1
  • 3
0
votes
1 answer

JsonReader running in thread crashes app

My app is crashing unpredictably and I don't understand why. I'm using HttpURLConnection to retrieve a json file and I'm trying to use the JsonReader class to read from, and use that file. The trouble is that the application crashes after reading or…
Thomas Horrobin
  • 400
  • 2
  • 13
0
votes
1 answer

Adding GZIP encoding results in MalformedJsonException

I added this header in my base request: "Accept-encoding", "gzip" This now results in a MalformedJsonException urging me to use JsonReader.setLenient(true) I've modified my code to this to support that: JsonReader jsonReader = new JsonReader(new…
AndroidEnthusiast
  • 6,557
  • 10
  • 42
  • 56
0
votes
0 answers

Should I use JSONReader for complex json streams?

I've been trying to parse a very complex JSON blob with several levels of nesting. The structure of the JSON returned by the server can change for every call. I have written a recursive JSON parser using org.json, but the performance isn't great. I…
sr09
  • 720
  • 5
  • 26
0
votes
1 answer

Define mapping in reader

I have defined a custom ComboBox component, that I want to re-use with multiple Stores. It has a simple config as below. Ext.define('Myapp.CustomCombo', { extend: 'Ext.form.ComboBox', valueField: 'id', displayField: 'name' }); The model…
bhates
  • 21
  • 1
  • 8
0
votes
1 answer

Gson.fromJson() not working as expected

I've a huge json string that I want to use to retrieve objects. That's why I used Gson instead of the usual JsonObject as said here. Here is my code: public List getProductsData() { url = "http://api.xxx/products.json"; …
Florent Gz
  • 934
  • 1
  • 10
  • 22
0
votes
0 answers

Wrong characters UTF8 with local json in Android

I have a problem of codification reading a local .json from raw folder. The ParseJson class is same to example official: http://developer.android.com/reference/android/util/JsonReader.html I pass it a InputSteam and I get a List correctly but with…
CarmaZone
  • 21
  • 4
0
votes
2 answers

Javascript to read json which is starting with some extra string

I'm trying to read a json url but JSON appearing some extra string before JSON start JSON script is like: throw 'allowIllegalResourceCall is false.'; { "name":"mkyong", "age":30, "address":{ "streetAddress":"88 8nd Street", …
Khoyendra Pande
  • 1,627
  • 5
  • 25
  • 42
0
votes
1 answer

jsonReader and jqgrid not populating json onto grid

I have the json below and I am trying to get is display onto my jqgrid. I have the following jsonReader jsonReader : { repeatitems: false, root: "abc", page: function (obj) { return 1; }, total:…
onelazyguy
  • 41
  • 2
  • 9
0
votes
1 answer

How can I read MANY json objects from a file in Java?

The corresponding methods of JsonReader reader are followed by the rule that "this method needs to be called only once for a reader instance." Is there any standard tool to read from stream until it ends?
0
votes
3 answers

What is going wrong with my etl process?

I'm using GoodData's CloudConnect (based on CloverETL) to read a massive json file and write certain elements to a .csv. Unfortunately, I'm seeing the error pasted below in the console log. Am I running out of memory due to the error, or is that not…
user3594534
0
votes
1 answer

How pass complex object containing stream to activity

I'm currently trying to pass an Object from the main activity to another. My object is Patient public Patient(int id, String name,JsonReader jsr, JsonWriter jsw, String firstName, String birth, String vcf, String[] clinicalFactors) I…
Jéremy
  • 53
  • 3
0
votes
1 answer

jqgrid json not loading data

I tried a lot to make jqgrid work but it does not work, and problem is there is no error or warning, how to find out where i am wrong. The gd setup is like this. It just show the blank grid, i.e no rows in the grid. I think jqgrid is not able to…
Aadam
  • 1,521
  • 9
  • 30
  • 60