Questions tagged [json]

JSON (JavaScript Object Notation) is a textual data interchange format and language-independent. Use this tag when this text format is involved. DO NOT USE THIS TAG FOR NATIVE JAVASCRIPT OBJECTS OR JAVASCRIPT OBJECT LITERALS. Before you ask a question, validate your JSON using a JSON validator such as JSONLint (https://jsonlint.com).

Filter by
Sorted by
Tagged with
0
votes
0answers
4 views

Online Tool To Split XML File Into Multiple Files

Is there any online tool that would splits a huge XML file into multiple files? Online Tool To Split XML File Into Multiple Files
0
votes
0answers
16 views

Retrieving JSON ID of an iterated object when using Object.keys()

I am trying to use Object.keys to iterate through JSON data to populate an array of objects to use with React-Select. The JSON data is formatted thus: { "us-northeast": { "label": "...
1
vote
0answers
8 views

Deserializing JSON with Jackson for polymorphic classes

I am attempting to deserialize JSON which can be either a GroupRule or AttributeRule: AbstractRule GroupRule AttributeRule I want my models/entities/POJOs to be generic as I also use the same ...
-1
votes
0answers
5 views

Rename dictionary based on the Parent ID in Python

Let's say I have a dictionary as below: { "data": [ { "Age": 32, "Emp_id": "A", "Gender": "M", "Result": [ { ...
0
votes
1answer
14 views

script.js:24 Uncaught (in promise) ReferenceError: att is not defined

Hi I am very new to javascript and is trying to consume the api I made and encountered an error here is the error: Uncaught (in promise) ReferenceError: att is not defined at script.js:24 at ...
0
votes
0answers
4 views

Parse JSON file in Ansible

I'm trying to parse a JSON file in ansible. I'm able to print the values, but I'm having issues to print the nested values. This is the JSON file basic structure: { "Hosts": [ { "LocNm": ...
0
votes
0answers
41 views

How to iterate list items to store as a dictionary and write it to json?

I have a list and I want to iterate and write it to write to json. For example: lis_1 = ['fellow','hello','yellow'] Now I store it as a dictionary: items_main = {} new_list = [] result_2 = {} items ...
-1
votes
0answers
10 views

Comparing 2 json files to one json

I am trying to pull info out of two json files and combine them off of one attribute like below. I want to match ID and and get email, name, and ID from a.json and match ID and get phone from b.json =...
0
votes
0answers
16 views

JSON Array to JSON Object

I'm using a HTTP request that gets a JSON array and pushes this into a JSON object which is read by a list view. I'm having difficulty forcing the JSON array into a JSON object so I'm currently ...
0
votes
0answers
13 views

How I can get object from another function

I'm trying to do a Shopping cart with HTML and JS. So I'm using (https://www.smashingmagazine.com/2019/08/shopping-cart-html5-web-storage/). In my function save(), I have, `function save(id, title, ...
0
votes
2answers
15 views

MVC ASP.net ajax json Datatables errors - json error, cells not displaying data

this may be a duplicate but I've tried everything I can find on stack exchange and datatables.net forums. I can't get it to work at all. I have var listOfFiles which is a list of the following model ...
-1
votes
0answers
10 views

How to fix “Undefined offset: 1” [duplicate]

i'm using a json file, that some items has a "sub-item" and some dont. Example Json (w/ item) { "Price": 2000, "items": [ { "id": "ff3_rockerpunk", ...
0
votes
0answers
9 views

How can fix EXC_BAD_ACCESS (CODE = 1,) in Swift?

I am try to binding collection view header with server data. For that I am using alamofire. But when I try to fetch the username or any user information for "User Profile Page" every data comes nil ...
0
votes
0answers
8 views

StreamSets DataCollector - I want to convert a JSON map to a list

In StreamSets DataCollector I have a JSON file coming in. I want to convert a JSON map to a list without specifying each map item individually. How do I do this without any coding?
-3
votes
0answers
18 views

Why does this code return undefined when using the steam web api

I am new to the steam api and am confused why this code returns undefined. the code works when using .name instead of original_price // @grant unsafeWindow // @run-at document-idle // ==/...
0
votes
1answer
15 views

How to design JSON parser Entity Objects for Currency Converter API with below Output

I am writing an application to consume currency values from external API converter https://exchangeratesapi.io/ to convert one currency to another. For ex., https://api.exchangeratesapi.io/latest?...
-1
votes
1answer
10 views

Parse json array to a case class in scala using playframework with the fields in json not matching the fields in case class

I am trying to parse a simple json array to a case class using scala and play framework. Below is the code package com.learning.avinash.query import play.api.libs.json.{JsPath, Json, Reads, Writes, ...
0
votes
0answers
6 views

Convert json format CCD to xml -Mirth Connect/ Java Code

I am receiving CCD document in JSON format and I need to convert it to normal XML CCD format. I tried convert this JSON using inbuilt JSONtoXML function available in Mirth connect but it didn't work. ...
0
votes
8answers
43 views

Javascript ES5: How to Group By a key and create Sub objects from a flat array of key-value objects without using Lodash or Underscore

I have an array of Objects with 4 keys: [ { "team": "USA", "team_profile_id": "10", "player": "Captain America", "player_id": "10X1" }, { "team": "USA", "...
0
votes
0answers
6 views

Alexa skill sends request to wrong skill

For some reason the Alexa simulator started sending request to other skills. I can invoke my skill, receive the response, then whatever intent I try to use I get an audio only response. I checked the ...
3
votes
1answer
29 views

Spring validate string value is a JSON

I have some value from my configuration file, that should be a JSON (which will be loaded as a String). I'd like Spring to validate that this value is indeed a valid JSON before injecting it and ...
-1
votes
0answers
9 views

Communication between web services for text web search API? [closed]

Task is to be created database with researched texts from some internet portals. For example, we should research some portals and storage some texts with key words in local database. We need also ...
1
vote
1answer
27 views

filtering dataframes from JSON inputs

I am trying to filter a data frame based on user input via a JSON file parsed into the script. Given the following inputs: #tibble to be filtered: > database # A tibble: 11 x 6 strain ...
-1
votes
1answer
33 views

How to convert this to Json in Java/Android?

I would like to convert this, which I don't know what it's called, to Json. Can you help me? [{key1=value1,key2=value2,key3=value3}] The result has to be this: { "key1":"value1", "key2":"value2", "...
0
votes
0answers
9 views

Get X-WP-Total headers with Swift

In Wordpress REST API Hanbdook is written what: To determine how many pages of data are available, the API returns two header fields with every paginated response: X-WP-Total: the total ...
0
votes
2answers
23 views

React axios get data from JSON by object unique name

I have a structure like this: { "RESTAPI": { "uniqueId": { "id": "1", "data_2": "data_2", "data_3": true, "mg_gateway": "Another Object" ...
1
vote
1answer
17 views

Get android codename from model with the jq tool

Trying to get the codename of a specific android device having its model and brand from https://github.com/jaredrummler/AndroidDeviceNames : $ brand=ACER $ model=B3-A20B $ \curl -Ls https://github....
1
vote
1answer
27 views

Deserialization of inteface types not supported using System.Text.JSON

I am passing in a valid JSON object to my controller on my .net core 3 web api application. Doing so, I get the error: System.NotSupportedException: Deserialization of interface types is not ...
0
votes
1answer
22 views

How do I parse this JSON field in PostgreSQL?

I've got a column in a table that appears to be JSON, but I'm not sure how to parse it (PostgreSQL). Here's an example of the data that's in the field of interest: [{'identifier': 'goals_scored', 'a'...
0
votes
1answer
53 views

Can you save multiple separate lists to localStorage?

I'm working on a project that will take user input and store it into a list in localStorage. I want to be able to have three of these to do lists on the page. I have put the code into three separate ...
0
votes
3answers
54 views

It's not possible to convert a string from JsonObject to float in Unity

I am using the 'Socket.IO for Unity' plugin and sending data to the server using JSONObject, but I can't convert from string to float. Using: Debug.Log(e.data.GetField("vertical").ToString()); ...
-1
votes
1answer
19 views

How to fix unset json object in php

I have below json object, { "products": [{ "type": "HR_ECLAIM", "name": "HR Claims", "is_fixed_price": true, "price": 500.5, "currency": "MYR", "status"...
0
votes
3answers
33 views

React Router Fetching data from API

I am new to react and now am working on a app that has to fetch some data from an API. I have my component that supposed to fetch the data and get an Json object back and populate a table. ...
0
votes
1answer
23 views

SwiftlyJSON data from file

this is my first time at swiftlyJSON and I have a problem. I have data in the local json file and I need to take a single object with this file. I used swiftlyjson but I don't know how to parse a file....
0
votes
1answer
12 views

Why does the python JSON module show the error : json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

I have a problem with the JSON module. I can't find out why this is an error: with open('Book Store Data','r+') as file: print(json.load(file)) json_contents = json.load(file) I can't figure ...
0
votes
1answer
21 views

i got this error when i print some data from json : List<dynamic>' is not a subtype of type 'Map<String, dynamic>

This is my code getMarker() async { List list = List(); String myUrl = serverUrl + "/markers"; var response = await http.get(myUrl, headers: { 'Accept': 'application/json', }); list ...
0
votes
2answers
32 views

How to write JSON object into JSON array using Python?

I have a Python file that generates an object for a machine. Sample below. { "Date/Time": "2019-01-01 8:00:00", "Availability": 68, "Performance": 70, "Quality": 70 } I have another Python ...
0
votes
1answer
37 views

What is the easiest way to access deeply nested json data using iOS and Swift?

I am using Swift 5.1 and I have a deeply nested json file and I am just interested in accessing a few elements within the json file and ignore the rest of the data. For instance, I just want "...
-2
votes
0answers
13 views

Running multiple line with JSON in Python [closed]

I am connecting to a student database using an API. I want to make an update/create to students. It will update like this "data = '{"student": { "first_name":"John", "last_name": "Smith"}}" I want ...
0
votes
0answers
9 views

parse json response using ansible

I need to parse the json response from an API request using ansible and then take action on items returned in the response. Here is part of my ansible playbook - ```- name: Invoke Import API uri: ...
0
votes
2answers
30 views

Deserialize Multidimensional JSON array with ASP.NET Core

I have been trying for a few days to find this issue, perhaps I am missing something. I followed the recommendations from Microsoft when I built my sample application based on GitHub: https://docs....
1
vote
2answers
34 views

How to break up this json_decoding file in PHP by key/value?

This is my first time coding in PHP. I have this json file (screenshot). json file It contains a name and sources array. I need to break up this "sources" array by the fields that are in the array (...
0
votes
1answer
27 views

Posting JSON data via AJAX to Web API fails with “The JSON value could not be converted to System.Int32”

I want to send data from my website to my WEB API my partners are working on via AJAX. The WEB API is a .net Core 3.0 app. And the form is to register a new user. But I'm facing a problem from ...
0
votes
0answers
8 views

Need JSONReader.java to read below JSON file and store its value in to a hashmap as Key Value Pair. Which will be searchable by Key Name

Sample JSON below { "dataSet1": [ { "testCase": "Verify error message on wrong userName", "username": "test", "password": "password", "...
0
votes
0answers
4 views

How to set multiple matches in a custom VS Code tmLanguage file?

I'm making my own language for a project (it's a simple one, but it'll be extremely helpful), and trying to add support to it on VS Code. Since there are quite a few types that are meant to be of the ...
0
votes
2answers
14 views

How do I use rxjs map to mutate data in object before casting a new type from an object gotten from a HttpClient request?

Hope the title isn't too specific. The back-end I am working with returns Dates as a string. I have a function to convert that string to a javascript Date object. I use a Rxjs map to convert the json ...
1
vote
1answer
30 views

How to parse a JSON result of an array of object and print in excel?

This is a multi-part question. I am looking to make a request and print the result in excel, with the headers at the top all across and the content data in the row below. When I run the following code,...
1
vote
1answer
27 views

Pandas dataframe and appending objects in conversion to JSON

Basically I´m reading a xlsx file using pandas and converting it to json file. I idk how to do it, but I think I have to create a 'if' statement to read each row and find which elements are different ...
0
votes
2answers
29 views

Javascript search by phone data through the object and display in the table

On input keyup Js gets the data from JSON object and displays data in table in html I need help with: 1: Sort data by phone and display only that table row which have numbers from input, and hide ...
0
votes
3answers
49 views

How to convert Json string array to ArrayList of strings?

I am trying to convert the following array of Json strings back to arraylist strings but I get an error. Array of Json data: "[\"Test1\",\"Test2\"]" I have tried the following from the question ...