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
-1
votes
0answers
10 views

TypeError: user is undefined when user is the parameter

I´m trying to execute a function and even though i see no error in it, when i try ti execute it it displays that error I´ve been trying with changing the way i´m calling userToHTML, but i really can´...
0
votes
0answers
3 views

How to convert json to csv with Pandas/ python3?

I try to convert a JSON file to a csv file. I have checked most of the delivered solutions on iterative blogs and here at stackoverflow. But the things I tried, did not work out... I am collecting ...
1
vote
0answers
9 views

Converting separate data frames to a JSON file for a tidy tree chart

I did not know how to store complex tidy tree data in excel, so I decided to store data for each level in a sheet. For a simple example, consider the two following dataframes. for making a tidy tree ...
0
votes
0answers
10 views

Swift parsing JSON, nested array

"def": [ { "sseq": [ [ [ "sense", { "sn": "1", "dt": [ [ "text", "{bc}...
0
votes
1answer
28 views

Extract a JS object as JSON

https://www.genenames.org/js/custom-downloads-bf.js The above URL contains an object like this. I would like to extract it print it to stdout in JSON format. Could anybody show me the complete code (...
0
votes
0answers
18 views

Acessing JSON elements by key using GSON

What I have: I am completely new to working with JSON files. I am currently using Gson to create two HashMaps<Key, List<Pair>> to store values into. I have gotten to the point where I can ...
1
vote
2answers
24 views

Push values from JSON object to array and use outside function

I am writing a axios JSON data call function and want to push values from my jJSON function to use outside of the function. Is there anyways I can do that? My Code: let website_names = `${api}`; ...
0
votes
0answers
12 views

How to ignore the “” in the XML using XSLT while converting it to JSON?

I am new to XML. I am trying to convert XML to JSON using XSLT. However, the JSON file generated with the XML content is failing validation due to one of the line items which looks like this: {"Name":...
0
votes
1answer
12 views

Flutter is not returning an api call

So I am trying to parse some json with http my method of parsing in this Future<bool> fetchUser(username) async { setLoading(true); await Osu(username).fetchUser()....
0
votes
1answer
18 views

JSON.stringify shows property value, but cannot access property directly [duplicate]

When trying to access a property of a JSON object directly (the object came from a MongoDB document), I'm getting an undefined value. However, JSON.stringify() does produce a value for that property. ...
0
votes
0answers
15 views

How to pass python data back to the calling script about a browser window left open when the called script closes

I am trying to find the best method to pass data from python script2.py back to the calling script (script1.py). I am using Python 3 on Linux. Script1 calls script2.py which then uses Selenium to ...
0
votes
0answers
9 views

Can't access “content” key in json file from facebok

i've downloaded my facebook data, including messages and wanted to do something with them. Let's say find the longest message in the conversation. I've used similar code but with other keys, to ...
-2
votes
0answers
14 views

What is the best way to architect DB to enable user defined heterogeneous data?

I have a web based data acquisition app intended to track several dissimilar data-points over time and be able to report aggregate values from those observations. Originally the requirement was for 3 ...
0
votes
0answers
8 views

jayway json path with nested arrays

I have following json and I need to fetch cntry=India when Types name is "route" $.api.address_components.*.types[?(@.name=='route')]["cntry","name"] { "api": { "address_components": [ { ...
0
votes
0answers
6 views

Json Structure - Avoid Repetitive Structure

I want to create a Json structure where I do not have repetitive properties (key: value) under different objects. For example, "policyCreation":{ "skipDocumentCreation": "false", "...
-4
votes
2answers
40 views

Get the values of a Observable<any> into an array in typescript

I'm trying to get the values from a post in typescript, I'm getting a Observable type variable from the post operation but I don't know how can I get the values within. Is there a way to do this? ...
0
votes
1answer
15 views

Issues refreshing DataTable

I am having two issues with my DataTable (https://datatables.net) first issue is I am trying to get my Data Table to display new information when a select box is changed, here is my code: let ...
0
votes
1answer
13 views

Posting multiple JSON files at onece

I am working with an api (Track-pod) and uploading JSON files to their server using a google apps script. I know this question has probably already been answered, but I have searched google ...
0
votes
0answers
12 views

Need help in finding specific error in a BlackBoard log file

I am troubleshooting a problem with a clients installation of our BlackBoard plugin. Per our request, we have been given some json formatted log files. These are very hard to read. I tried opening in ...
0
votes
0answers
13 views

Custom query for Mongoose

I tried to make a custom query for my MongoDB. I know the query is JSON, but I van add any statement to my query. I like to add "plaats" to my query. This example is not working, but I don't know how ...
0
votes
0answers
10 views

struct.error when creating process to load large dictionary/json with multiprocessing

I am trying to load a large json object into memory (as dict) and then use it with networkx to create a graph. The problem is that I have to read the json, which uses up a lot of memory, and then ...
0
votes
1answer
33 views

Decoding Error - keyNotFound when parsing JSON data

I am using NASA API in my iOS application for getting some images. My response from the server looks like: { "date": "2014-02-04T03:30:01", "id": "LC8_L1T_TOA/LC81270592014035LGN00", "...
1
vote
1answer
19 views

How do I access my GeoJSON data after I deserialised it into an object using Jackson

I have created a Java object by deserialising JSON file using Jackson. I want to render the data in the map template provided but I am not sure how to access it. Below is the code and the JSON file....
0
votes
1answer
26 views

Laravel 4.2 Response::json converts some strings to integer 0

I'm experiencing an issue with Laravel 4.2 using Response::json The data returned after querying my database is correct, but when I return it using: return Response::json($inventory); some values ...
0
votes
0answers
18 views

how to implement json url instead of plain text added

I have drawn this activity in my project where you can login and you can see the information which I added on RecyclerView, now the hard part on this is replacing the plain text which I added to a ...
1
vote
1answer
18 views

Filter out sub-array items that contain a specific key/value pair

I want to use jq to filter out sub-array items that contain a specific key/value pair without filtering out the non-array data. Input: { "log": { "foo": { ... }, "entries": [ ...
-2
votes
1answer
30 views

Need MySQL query results as array of JSONs, NOT array of arrays holding JSONs

I'm running MySQL 8 in a dev environment, learning as I go. I'm running a very simple PHP 7 RestAPI. Here is how I'm executing a simply MySQL lookup: $blockStmt = 'SELECT JSON_ARRAY(JSON_OBJECT("...
0
votes
0answers
19 views

Could not determine JSON object type System Argument Exception

I'd like to get some help on the below exception that I am facing when trying to set a value to a JSON Object. docRoot is a JSON string that DOES NOT contain an equipmentId object, so the goal is to ...
0
votes
2answers
28 views

Writing Scrapped data into JSON using Python

I am trying to save my scrapped data into the JSON file, using python. below is my code. I can scrap the data, but I am not able to save it into a JSON file. can someone tell me where is the problem? ...
1
vote
1answer
41 views

How to convert nested json into Map without typecasting using Gson

I am trying to understand/learn how to pull data from a weather API, i have successfully done that and i got a Json file filled with data. I managed with gson put the information into a Map. But it ...
0
votes
1answer
36 views

How to flatten a JSON using Awk?

I want to flatten a JSON string the way jq does it, but don't have jq disponible where my script will run. I have an input like this: [ { "State": { "Status": "running", ...
0
votes
0answers
14 views

Converting from JSON to Python objects||How to access this dictionary element

import requests import json url='https://www.googleapis.com/books/v1/volumes?q=isbn:0747532699' r = requests.get(url) data = r.json() print(data) Output looks like { "kind": "books#volumes", ...
0
votes
0answers
8 views

How extract key and value from json obejct with jsonpath?

Consider input json: { "TableList": [ { "Name": "myName", "someKey": "someValue", "Parameters": { "CrawlerSchemaDeserializerVersion": "1.0", "classification": "...
0
votes
0answers
54 views

I can't use if..else statements in multiple condtions in Javascript

Super beginner. I'm doing a contact form using Javascript, Json and for backend PHP. I can't get the conditionals to work when some fields are left empty, then all alert messages come one after ...
0
votes
2answers
33 views

How to read sections of JSON document?

I have a JSON document and I want to access the details of the STATUS SECTION but it keeps returning null. JSON Data is as shown: { "results":[ { "messageId":"15712480583306574",...
-1
votes
0answers
8 views

How to access fields from this complex Serialized Query-Set given below?

I want to fetch fields from this queryset but basic slicing operation didn't work. [{"model": "core.userdetails", "pk": 1, "fields": {"username": "uposia", "first_name": "Uday", "last_name": "Posia",...
0
votes
1answer
18 views

Postman Testing - Assert ONLY set key:value pairs in an object, no unexpected returns

I'm trying to understand how to write an assertion in postman that will verify there are no additional key:value pairs in an object. For example, here is some test data: "testArray": [ { "key-1" ...
0
votes
1answer
13 views

SerialBT.readString() save as string

I'm sending a String from my android device to esp32, I want to store SerialBT.readString() value to a string variable, but it's stored as an empty string, what should I do? if (SerialBT.available()) ...
0
votes
1answer
15 views

Python - search for a specific value in an array

I'm using Python and requests library to call an API in order to get some information. So far so good. The code is working fine and the response is successful: Request: def countries(): # ...
0
votes
1answer
18 views

How to handle special character in JSON

I have a column definition for the grid, i'm trying to put it in a JSON n load. There are few special characters and function for which I'm getting Invalid JSON Error [ { "headerName":"", ...
0
votes
1answer
29 views

Two instances of ObjectMapper

Is there a way to create two instances of ObjectMapper for different purpose. Modified ObjectMapper @Component class MyObjectMapper extends ObjectMapper{ public MyObjectMapper(){ ...
0
votes
1answer
27 views

JSON files parsing error while trying to print certain values using Python (json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 20))

I am new to Python, and I want to convert a JSON file and print it to the console. When I try to print the whole JSON it is throwing json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char ...
-1
votes
0answers
13 views

Find a value in Json with only the first characters of another value

I have a big problem that I’m trying to resolve in python 3. I want to be able to let a user input a time like 19:02 without the :51 part and retrieve the tripID. Same goes with 14:49 JSON example ...
0
votes
0answers
14 views

How to implement a websocket client server to serve json response?

I need to code a small Websocket server with node.js and socket.io who watch PDF file creation in a specific folder in the server. Multiple client could connect to the server, and server must watch a ...
0
votes
2answers
52 views

How to convert date time to double c#

I'm trying to convert a date and time value from a JSON string to a double in C#, but I keep getting the below error. Below is the code i am trying to debug. DateTime baseDate = DateTime....
0
votes
0answers
8 views

Elasticsearch match multiple IP subnets DSL Query

I am trying to do a DSL Query filter in Kibana for a specific URI, while matching multiple IP subnets. So far I have managed to make it work with only one IP subnet: { "query": { "bool": { ...
0
votes
2answers
18 views

Problem with Arraylist and Hashmap when populating Listview

I am trying to get the Data from my JSON file to HashMap and then to my Arraylist and it should be displayed in the Listview. But it doesnt show anything. Could you pls help me? public class ...
1
vote
0answers
10 views

Can I get Swagger json from a swaggerui url, using Springfox?

So, I have a spring boot Rest API running (A). I want to create a separate app(B) which shows the swagger document of A. In order to achieve that I guess I'd have to be able to capture the Swagger ...
0
votes
1answer
11 views

Ingesting Elastic output into Elastic

I have a customer that provided me with the output of an Elastic query that looks like the following, in a JSON file: { "took": 74, "timed_out": false, "_shards": { "total": ...
-2
votes
0answers
22 views

How to delete nested json data using nlohmann c++

I have a below json data. I am using nlohmann json in C++. { "CompanyName": "XYZ Tech", "Created": "2019-10-16T20:14:29Z", "TxnId": "4509237", "Tags": [ { "ROIId": ...