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
4
votes
5 answers

JSONParser returns Unexpected character () at position 0

I'm with problem to parse a JSON. Always that I try do it, the follow was result is returned: Unexpected character () at position 0. public Object execute(HttpRequestBase request){ DefaultHttpClient client = new DefaultHttpClient(); …
All Pereira
  • 139
  • 1
  • 2
  • 13
4
votes
3 answers

Map JSON values in Elixir

I have parsed the following JSON using Posion.decode! json = %{"color-Black|size:10" => %{"attributes" => %{"color" => "Black","size" => "11"}, "isAvailable" => true, "pricing" => %{"standard" => "$415.00", "sale" => 415}},…
RN92
  • 1,380
  • 1
  • 13
  • 32
4
votes
1 answer

Why does from_json fail with "not found : value from_json"?

I am reading a Kafka topic using Spark 2.1.1 (kafka 0.10+) and the payload is a JSON string. I'd like to parse the string with a schema and move forward with business logic. Everyone seems to suggest that I should use from_json to parse the JSON…
Raghav
  • 2,128
  • 5
  • 27
  • 46
3
votes
2 answers

GitHub Actions: How to pass toJSON() result to shell commands

So, I'm working with Github Actions on end-to-end testing. The setup I'm looking at is having one job retrieve a list of urls to be tested, and my second job creates a matrix with that list and tests them all. My problem here is that when I actually…
3
votes
2 answers

Unable to use JSON array for Azure Function

I have below JSON input for My azure function but unable to pass it in after deserialize object { "name": [{ "SiteName": "Site1", "SiteUrl": "https://site1.com/" }, { "SiteName": "Site2", "SiteUrl":…
3
votes
1 answer

The method parseString(String) is undefined for the type JsonParser

My code was working perfectly before but now it is throwing out an exception, The code : Gson gson = new GsonBuilder().setPrettyPrinting().create(); JsonElement jsonElement = JsonParser.parseString(resultJsonString); and the…
SharadxDutta
  • 1,058
  • 8
  • 21
3
votes
3 answers

How to convert localStorage code in React to AsyncStorage in React Native?

I want to know how to convert my React code to React Native using AsyncStorage. I have tried the below code but I am getting "undefined" for "isAuthenticated" and also an "error" in "JSON.parse(AsyncStorage.getItem('token')". I want to use the…
Samir Kumar
  • 33
  • 1
  • 6
3
votes
4 answers

JSON Parse Unexpected token h caused quotes inside string value

I have a JSON string that I got from the table, here's my JSON {"subtitle":"Information","desc":"Hi, Welcome.\\n

\\n You can access our website
Blackjack
  • 1,016
  • 1
  • 20
  • 51
3
votes
1 answer

Parse internal map from JSON in Moshi

I am trying to parse following JSON using moshi but I am unable to dynamic data like USA or UK. USA and UK are dynamic keys. { "USA": { "name": "United State of America", "code": "US" }, "UK": { "name": "United Kingdom", "code":…
user1288005
  • 890
  • 2
  • 16
  • 36
3
votes
2 answers

how to json parse a python output and store its values like in dict or variables?

I have a python code that outputs json import json from faker import Faker import random from random import randint import subprocess fake = Faker('en_US') for _ in range(1): sms = { "name": fake.name(), "email": fake.email(), …
user11124889
3
votes
2 answers

How to parse json having a nested schema?

Let the schema of my json is : root |-- data: array (nullable = true) | |-- element: array (containsNull = true) | | |-- element: string (containsNull = true) JSON is like this { "data": [ [ 10429183, …
Etisha
  • 307
  • 6
  • 16
3
votes
2 answers

JsonPath ignore the Debug logs on output

I'm using JsonPath for my JSON parsing work in Java. Is there any ways to remove the debug logs upon running the code? So basically, I am simply trying to run my parsing code in Maven: String pageName = JsonPath.read(json,…
Tina J
  • 4,983
  • 13
  • 59
  • 125
3
votes
0 answers

Parse a massive JSON array of hashes

I am trying to parse a JSON object that consists of a few hashes and a massive array of hashes (sometimes 300,000 hashes inside the array, 200MB). Here is an example of the JSON object. I need to parse hash by hash inside the array…
kriztean
  • 229
  • 3
  • 13
3
votes
1 answer

Qt JSON – query from subitems

I have a problem with querying a sub-item from a sub-item. JSON file: { "user": { "url": "www", "set": { "s_a": 1, "s_b": 2, "s_c": 3, "s_d": 4, "s_e": 5 } …
Sonya
  • 53
  • 5
3
votes
5 answers

parse [object Object] Angular 6

I want to parse a string and save projectName and poNumber into 2 variables. This is what I have by now, using JSON.parse() employees = [] JSON.parse(data).array.forEach(element => { this.employees.push({ projectName: element.projectName, …
Tenzolinho
  • 922
  • 2
  • 15
  • 35
1
2
3
40 41