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
1
vote
1 answer

Java JsonPath - Get all paths of attributes that are primitive types

I'd like to find all Json paths from a json file where attribute type is primitive (not object or array) Consider jsonString: { "header": { "version": 2, "original": "ori", "parent": "par", "eventId": 11, …
Serhii Kachan
  • 345
  • 4
  • 13
1
vote
1 answer

Parsing JSON to get only specific children not all the children

I have been trying to parse the following JSON data using JSON.Parse(), I only need the url tags inside images not the caption or resizedImageUrls. {"images": [ { "url": "https://media.IMG_0001.jpg", …
neenkart
  • 158
  • 2
  • 21
1
vote
0 answers

How to get same attribute of multiple objects in a JSON file using Java?

I have a JSON file that has stock data of different portfolios. [ { "name": "octoberportfolio", "pathame": "C:\\Users\\Documents\\octoberportfolio.xlsx", "stocks" : { "SWN": ["Southwestern…
1
vote
1 answer

Json Data reload again on configuration changes in background tasks

I have made an app Earthquake Report app. in that I am fetching earthquake data through an API and showing it in recycler view. This process runs on the background thread by using the Executor service method and runnable. But when I run my app and…
1
vote
1 answer

How can I get last element of JSON Object without specifying key value?

Here is the data of covid 19 coming from that API: https://data.covid19india.org/v4/min/timeseries.min.json I want to reach the last element / or "2020-03-06" of "dates" JSON Object in JAVA / Android Studio. If anyone can suggest to me that how can…
1
vote
1 answer

How to convert a string with equal "=" sign to json in JavaScript

The Following String is returned from Kafka to Lambda Connector. '{device_id=D_2021_A07, key=tele_metrics, sensor_1=62, sensor_2=23}' I want to convert this to a valid JSON like this { "device_id": "D_2021_A07", //String "key":…
Abiram
  • 188
  • 1
  • 1
  • 7
1
vote
1 answer

Can't access property from JavaScript object

I need to access properties from this object, but I am getting undefined. I tried use JSON stringify and parse but without success. console.log('ress', response.data); console.log('ress data', response.data.url); console.log('ress key',…
Paulo Rodrigues
  • 397
  • 4
  • 20
1
vote
1 answer

Illegal unquoted character ((CTRL-CHAR, code 10))

I’m having issue consuming REST API. Below is my rest client. It fails at the service call with error: org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Illegal unquoted character ((CTRL-CHAR, code 10)): has to be…
alex
  • 21
  • 1
  • 5
1
vote
1 answer

Valid (?) JSON data causing errors in Django, must be served to frontend as string and converted by JSON.parse() in javascript - why?

I have a JSON file hosted locally in my Django directory. It is fetched from that file to a view in views.py, where it is read in like so: def Stops(request): json_data = open(finders.find('JSON/myjson.json')) data1 = json.load(json_data) #…
Eugene Egan
  • 25
  • 1
  • 6
1
vote
2 answers

Parsing JSON string into columns using R - JSON string with inconsistent ordering of properties

I have a CSV with a JSON string with inconsistent ordering of the fields. So it looks like this: Row 1: '{"name":"John", "age":30, "car":null}' Row 2: '{"name":"Chuck", "car":black, "age":25}' Row 3: '{"car":blue, "age":54, "name":"David"}' I’m…
audiotis
  • 11
  • 1
1
vote
1 answer

Mapping the JSON attribute values dynamically to another JSON and store to Cassandra database

I am new JSON and Cassandra part i am doing a POC in which i receive a stream of JSON object. I have a configuration JSON which is like the subset of the incoming JSON Object. Right now what i am doing is i have method which will extract the…
user13906258
  • 161
  • 1
  • 13
1
vote
2 answers

How do you parse json data that is under multiple layers?

The goal of the code is take json information I am getting and parsing it into its raw location data( address,postal,etc). I am pretty new to coding and this is a one off task I got stuck with for a school project as I studying Geography and need…
John_Muir
  • 119
  • 7
1
vote
1 answer

RestTemplate - postForObject method - adds entry in database but gives me JsonParseException exception

I am trying to create RestTemplate method for my Movie server application. The PostForObject method works for my entity class (i.e. it writes to the database) but on the browser it gives me huge stack trace of exception. All these concepts are new…
Jay
  • 339
  • 1
  • 7
  • 23
1
vote
1 answer

How to map the complex json response of the following type to java model class

JSON Response: { "data": { "account_summary": [ { "aggregation":{ "activeAccounts: { "value": "0" }, "deletedAccounts: { "value": "1" }, …
1
vote
1 answer

Gatling load test gives 400 bad request error

i am trying write a load test for this project https://github.com/theiterators/akka-http-microservice by using post request to server. but all the responses are failed. how can i resolve it PostSimulation import io.gatling.core.Predef._ …