Questions tagged [jsonreader]

114 questions
0
votes
0 answers

IIS with my Blazor Webassembly ASP hosted (api calls) application throws Json Reader Exception trying to retrieve data from SQL Server

My Blazor Webassembly ASP.NET Core 6.0 hosted app is published to IIS 10.0 (Windows 10). It has api calls to SQL Server. I can't get my collection (List) populated from SQL server and Web Browser shows error: fail:…
0
votes
1 answer

How can I read json data which has its tag/identifier in quotes?

I'm using NodeJS to fetch the NPM registry with the code below. import fetch from "node-fetch"; let url = "https://registry.npmjs.com/[package-name]"; let settings = { method: "Get" }; fetch(url, settings) .then(res => res.json()) …
0
votes
1 answer

How to read non-iterable parameters with ExtJS JSONReader

I am sending over the following JSON structure: { "header": "Staff Name", "result":[ {"firstname":"Leo","id":1,"lastname":"name"}, {"firstname":"Robert","id":2,"lastname":"name"}], "totalCount":4, "success":true} In my JS file I define…
aksamit
  • 2,325
  • 8
  • 28
  • 40
0
votes
1 answer

Read a simple JSON file with GSON JsonReader

I thought this would be simple but it keeps crashing with InvocationTargetException at reader.hasNext(). File jsonInputFile = new File(root + "/dicts/phrases.json"); JsonReader reader = new JsonReader(new FileReader(jsonInputFile)); …
Hasen
  • 11,710
  • 23
  • 77
  • 135
0
votes
1 answer

Bug report ExtJS 7.4.0 Ext.data.reader.Json

first post on this account, how exciting. Sadly, the contents are less exciting. I have found a very simple bug in the reader.json function getResponseData. I want to have proper error handling in my application should, unexpectedly, the server I'm…
0
votes
1 answer

How to read the value from json using JsonReader without knowing the json key

I am trying to use TypedArray to parse json. My json will be the following: { "id":"112233", "tag":"From server", "users":{ "vijay":1, "dhas":2, "vijaydhas":3 } } Here the in the users object key…
0
votes
0 answers

Encountering JSONreader ClassNotFoundException despite including it on classpath

I am trying to figure out how to use the JSONreader package, I have downloaded the gson-2.8.6.jar file and am using the command: javac -classpath gson-2.8.6.jar Dummy.java This command works fine but when I go to execute the file with JSONreader…
0
votes
1 answer

Google.Apis.Urlshortener in C# giving Error JsonReaderException

I want to use Google Nuget package for shortening URLs. I included all the required files public string shortenIt(string url) { UrlshortenerService service = new UrlshortenerService(new BaseClientService.Initializer() { …
Shomaail
  • 493
  • 9
  • 30
0
votes
0 answers

JsonTextReader gets stuck after reading a certain amount of lines

I'm trying to deserialize a large stream of Twitter Tweets. Everything is going well at around the first 200 deserialized tweets, but after that, the Deserialize method gets stuck and never proceeds. If I leave it to work for a prolonged time, it…
Avi Meltser
  • 409
  • 4
  • 11
0
votes
2 answers

How to loop through json array of json object in java

I am trying to loop through the json file and find the value of particular json object. Here is my sample json: { "diagram":[ {"size":{"width":30,"height":20},"color":"blue","id":1}, {"color":"red","id":2}, …
krishna
  • 343
  • 2
  • 5
  • 19
0
votes
1 answer

How to resolve MalformedJsonException: Unterminated object that exist even after setting JsonReader to lenient

I am trying to parse two json files and convert them to Map using gson but while doing the above convertion using gson i am getting com.google.gson.stream.MalformedJsonException: Unterminated object exception. I have my json file…
krishna
  • 343
  • 2
  • 5
  • 19
0
votes
2 answers

FileNotFoundException in the onCreate() method

I keep receiving the FileNotFoundException error when trying to load my file into a JSONReader using an InputStream within my onCreate method. I've tested this code in a simple Java program and it seems to work fine and also reads the JSON file too.…
Adam
  • 203
  • 1
  • 14
0
votes
0 answers

how to read input data (.json file)line by line using dictionary in c# --> generic code

I'm using Newtonsoft.Json to read a .json file. I need to generically --> It should loop through all the datas where data/count may vary every time. //var map=new Dictionary(); using (StreamReader file = File.OpenText(filepath)){ …
0
votes
3 answers

Can not read the specific values of json file in objective c

I have downloaded the json files in my App Folder and I want to read that files from my App Folder to print specific values. Files are located like this :…
Max
  • 3
  • 3
0
votes
1 answer

Transform and flatten JSON using GSON

I’m working on splitting a SignalK JSON object into canonical JSON items representing each value. The original JSON looks like this: { "mmsi": "urn:mrn:signalk:uuid:5377770-4ee4-4a4b-3230-888037332031", "name": "Mona", "navigation": { …
fredimx40
  • 5
  • 1
  • 2