Questions tagged [jsonparser]

Questions concerned with parsing JSON files using either built-in, third-party or custom built JSON parsers. Questions about implementing JSON parsers are valid too.

Questions concerned with parsing JSON files using either built-in, third-party or custom built JSON parsers. Questions about implementing JSON parsers are valid too.

607 questions
2
votes
1 answer

How do I parse Merriam-Webster api's JSON response?

I'm trying to make a chrome extension that searches words from the web in the Merriam-Webster dictionary, so I received an API key and started programming my background.js for a contextMenu. Here is an example of a…
Jongwoo Lee
  • 774
  • 7
  • 20
2
votes
1 answer

Unhandled Exception: type '(dynamic) => Welcome' is not a subtype of type '(String, dynamic) => MapEntry' of 'transform'

I am trying data serialization from json to dart. But I didn't this error can't get over. Unhandled Exception: type '(dynamic) => Welcome' is not a subtype of type '(String, dynamic) => MapEntry' of 'transform' I will show my codes…
Ehex
  • 35
  • 1
  • 5
2
votes
4 answers

Unable to get value after JSON parsing

I am facing issue while converting the value from below string. Tried to parse JSON but didn't work. const val1 = "{a: '123'}"; console.log(typeof(val1)); // string const a = JSON.parse(val1); // Gives Error: Unexpected token a in JSON at…
iReact
  • 145
  • 1
  • 1
  • 8
2
votes
1 answer

Using constants as keys while creating Dictionary in Type script

I've a "constants.ts" file which has below code: export const PLACEMENT_ID = 'placementId'; export const TIMESTAMP = 'timeStamp'; In my type script code, I'm trying to use the constants as keys while creating a dictionary and then convert it to…
Satyam
  • 15,493
  • 31
  • 131
  • 244
2
votes
2 answers

Print JSON array output to Google Sheet

I am trying to parse the output of a JSON array in Google Script and print it to a sheet. Expected output in the sheet: Row 1: AUD | CNY | GBP | HKD Row 2: 0.98 | 5.01 | 0.56 | 5.60 Row 3: 0.91 | 8.01 | 0.93 | 2.61 I am currently using the…
2
votes
1 answer

Trying to insert geovalue in Postgresql but it shows syntax error

I want to insert the geovalue in PostgreSQL but it shows some kind of syntax error. try { var res = await googleTrends.interestByRegion({keyword:keyword,geo:"US-"+state}); //resolution:keyword res = JSON.parse(res); // for…
2
votes
2 answers

Unable to access inner JSON value in JSON array - Typescript(Using Angular 8)

I am trying to use the group by function on a JSON array using the inner JSON value as a key as shown below. But unable to read the inner JSON value. Here is my JSON array. NotificationData = [ { "eventId":"90989", …
2
votes
1 answer

Azure Data Factory V2 Copy data issue - Error code: 2200

I'm trying to pull data from ServiceNow tables using the REST API connector in Azure Data Factory V2. While pulling the data, I'm getting the following error sometimes and sometimes I'm not getting any error and the pipeline is successfully…
Akhil
  • 41
  • 3
  • 10
2
votes
3 answers

Java Simple json not replacing the value of a attribute

As the tital states above I am trying to replace the value for "name" to "abc" but that does not seem to overwrite it as it's the same value after replacing it using the Simple Json java code. This is my java code: String jsonString = "{" …
StealthRT
  • 10,108
  • 40
  • 183
  • 342
2
votes
1 answer

Handling both Json and XML response in Retrofit - Android using addConverterFactory

I am expecting both json and xml response in my app. Retrofit 2.0 allows you to add multiple Converter Factories for such situations. But it seems the order is of utmost importance here. Adding JacksonConverterFactory above SimpleXmlConverterFactory…
Shishir Shetty
  • 2,021
  • 3
  • 20
  • 35
2
votes
2 answers

Why is this JSON Parsing becoming more and more efficient?

I have a function to parse JSON in android. I use org.json for my parsing. It is something like this: class ClassName { public static ArrayList parseResponse(String response){ JSONObject responseObject = new…
ColonD
  • 954
  • 10
  • 28
2
votes
2 answers

JSON Parser using c

I have to parse a JSON using c code(not lib because want to make things look as simple as possible) for some real-time handling. Below is data need to be parsed which I will be getting from some calculation generated by the code itself. Please help…
ashu nath
  • 21
  • 1
  • 2
2
votes
0 answers

how to use yajl-ruby to parse and filter data from big json file (2G size)

i need to filter out some data from a json file(about 2G size). the josn is like { "dataName": "staff", "version": 5, "data": [ {"name":"Fred", "team":"football", "hobby":"climbing" }, {"name":"Tony", …
2
votes
1 answer

How to parse json string with UTF-8 characters using java?

I have a json string with SUBSTITUTE () utf-8 character. I'm getting parsing exception when I try to convert json string to java object using jackson. Can you please let me know how to encode and decode utf-8 characters ? ObjectMapper mapper = new…
Tech Guy
  • 417
  • 2
  • 7
  • 23
2
votes
1 answer

Formatting a multi-line Json user-input to a single line Json String to be passed to the JsonParser in a Java console app

I am creating a console app that parses JSON and does something with it. However, I am having problems preparing the user's input to be passed to the JsonParser function: final JsonParser parser = Json.createParser(new…
Blake Rivell
  • 13,105
  • 31
  • 115
  • 231