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).

0
votes
0answers
2 views

jq merging multiple json files merging any array element

I want to use jq to merge multiple files and if more than one file contains an array with the name, I need the arrays merged (order doesn't matter). For example file1 { "value1": 200, "...
1
vote
0answers
10 views

Node, Express, and streaming JSON data into endpoint

I'm having a hard time piecing this together from examples, out on the web. Figured this would be a no-brainer for Node. We'd like to provide an endpoint in our Express API to allow third-parties to ...
0
votes
1answer
8 views

What file format start with “Document{{_id=”

I need to know what file format starts with Document{{_id= and what software to use to import it. Is it mongoDB? Thank you!
0
votes
0answers
7 views

How to create soap request body from json

I have created a node.js application to create a soap request body from a json object. I have the following code var convert = require('xml-js'); var xml = `<soapenv:Envelope xmlns:soapenv="http://...
-4
votes
1answer
32 views

JSON results not properly quoted

I'm writing a python script that pulls data from an API that returns JSON. When I access the API endpoint in a browser I get results that are properly quoted; e.g. { "architecture_name":"x86_64","...
0
votes
0answers
4 views

Gitlab pipeline logging: double quotations around JSON literals are replaced with single quotations

I am assigned a task of writing some tests to verify certain log lines appear in the final logging content. There is a regex like: PreAuthClientResponse\(responseRawData=\{"result":".+"\}, advice=.+, ...
0
votes
0answers
7 views

Styling angular-json-tree(angular plugin) root element

I'm using angular-json-tree plugin to display json tree. I would like to style some attributes in the dispalyed json. I have tried to add inline css which is not working. <json-tree object="...
0
votes
0answers
21 views

How to array complex json?(php) [duplicate]

So this is my json file (from the api of the radio station) {"errorCode":0,"errorMessage":"","response":{"channel_id":"20","channel_facebook_link":null,"channel_twitter_link":null,"type":1,"type_name"...
0
votes
0answers
9 views

Populate participants reading a json file in hyperledger

i'm trying to create a transaction to automatically populate the participants of my network. I have few experience with Javascript and Json, but my idea is to read an external json file to populate ...
0
votes
2answers
25 views

How to remove brakets on Json respone

im working on Laravel Rest Api with passeport , in return response()->json() i want to trim the brackets I've tried trim($json,'[]') function but it's not what i want public function getOffers() ...
0
votes
0answers
17 views

How to properly format JSON in Powershell while using aws-cli?

Error sending JSON structure using aws-cli in Powershell. Specifically a call to put an item into an existing DynamoDB table. The problem seems to be that the lack of double quotes around keys and ...
0
votes
0answers
21 views

Best way to save a grid and all children

I'm designing an application that allows users to create a custom grid (It uses WPF Grid control inside a canvas, with each cell containing a "blank cell" which is just a panel with a border. They can ...
0
votes
0answers
25 views

JSON returns empty when calling method twice in Javascript/NodeJs

I have this method using Loopback(Node.Js framework) to return a JSON composed of MP3 and videos. This is the code I have so far let names = await app.models.cm_comediens.getValue(); let ...
1
vote
0answers
16 views

Conversion of JSON to Presto based SQL Query

I am creating a web app in which there is an analytical dashboard that is allowed to generate a query. This query will be forward to backend server through an exposed API. The controller (written in ...
1
vote
0answers
33 views

Get data in array through form

I am not getting data in my array when i submit the form I am using AJax then . $post['FirstName'] = $_POST['FirstName']; //not getting value in array from form $newArray = array(); // initialize ...
0
votes
0answers
14 views

How to parse Input Object Date fields with format given in the object field itself

I have a Spring project where in the controller method I am having '@RequestBody Object obj' as one of the parameter. Object have Date fields which are having custom JSON Serializer and custom JSON ...
-3
votes
2answers
41 views

Iterate a nested JSON array

My JSON is as follows :- { "ok":false, "status":400, "statusText":"Bad Request", "body":{ "message":"An error occurred while trying to update the record. Please try again.", "...
0
votes
1answer
20 views

Map json data into dart class then put into flutter listview

Its my first time working with apis, but the json that I am receiving is quite big and complicated, so the scenario is as follows: I have a json data that is retrieved from an api The data in the ...
0
votes
0answers
4 views

Hiding undefined attributes in vega-lite tooltip

I want to display flags in my vega-Lite tooltip where only, depending on the object, some are set. My tooltip looks like this: "tooltip": [ {"field": "base", "type": "nominal", "name": "Base"}, ...
0
votes
0answers
19 views

Using np.nan in a JSON file and calling it in Python

I have a code where I am mapping a part of it from a JSON file. Below is the JSON code snippet and I have a condition where, if High is present, then max operation would be applied and if Low then min ...
0
votes
0answers
45 views

Opening child object in JSON

I have a catalog. When I click on the product, I turn to the furniture page. The data is loaded from json. The data for the furniture page comes from the object details. How to do this when I click on ...
0
votes
1answer
26 views

Json document creation with JSONObject and JSONArray in java

Need help to create a JSON document. Below is the JSON document which I want to create using Java. [{ "TestCases": { "Object1": [ "id", "name" ], "Object2": [ "value", "title" ] ...
-1
votes
0answers
23 views

How to access CustomAdapter ArrayList and position in another Webview activity to load url

I have to create a webview and the url load from json using retrofit2 library. So i want to access the url in my app only ,that's why i want to use the custom adapter Arraylist and position to Webview ...
0
votes
0answers
7 views

Instagram media.json How to add them to exif?

I get my photos out of Instagram and i get zip file with all the photos what i have there but they dosnt have any exif data on them. The zip file has also a json file called media.json where all ...
0
votes
1answer
20 views

What is the best format to return array in JSON response?

I'm asking about the best practice to return data array in a JSON response... Like this : { myObjectContainsArray: [ {object1}, {object2}, {object3}] } // and get it like this => ...
-4
votes
1answer
32 views

Convert TXT file to Json in Golang

I'm struggling trying to convert a text file to JSON. I can't use python for limitations in the implementation so it needs to be in Go. I have this file structure VAULT_ADDR=https://address.com ...
-1
votes
1answer
11 views

How should I do using multiple different two languages in NodeJs?

Can someone help me and can explain about this matter? Currently, I'm just building a blog which I used which nodejs. In my projects, I want to use and display the two different languages which my ...
-2
votes
1answer
17 views

How to parse JSON-input

I've been reading JQ-s docs for the last two days and didn't find out how to extract values and put them together. I've got some curl-output: ... { "key": "Agreement", "doc_count": 1603, ...
1
vote
3answers
59 views

How to parse JSON having nested arrays in javascript or jquery

I want to parse JSON like below { "nodeId":3892718504, "root":true, "subs":[ { "nodeId":3892717286 }, { "nodeId":3892716092, "subs":[ ...
-1
votes
1answer
23 views

how to convert multi valued CSV to Json

I have a csv file with 4 columns data as below. type,MetalType,Date,Acknowledge Metal,abc123451,2018-05-26,Success Metal,abc123452,2018-05-27,Success Metal,abc123454,2018-05-28,Failure Iron,...
0
votes
2answers
43 views

how to convert a c# Datetime Object to json on razor pages for client side manipulation

I am trying to convert a stored datetime object from database to Json object on the razor view page so as to manipulate it and compute time elapsed for a list of users in real time. I'm not sure how ...
-2
votes
0answers
10 views

I want to build a Vue FAQ accordion component that fetches json data from an external API

How do I build an FAQ component in Vue that uses JSON data from an external api, with a click event toggling the accordion to show the answer of the FAQ The data is similar to that below. Here's an ...
-3
votes
1answer
25 views

How to load data from a file and use them in loop?

have a python code that outputs following to a txt file : out.txt contains : "1":"pass1425-*", "2":"pass1234- ", "3":"pass0*++", ........ ..... "100":"pass*-+" need to use this values of 1,2,3,4,...
3
votes
2answers
35 views

How to check if key present in nested json in c++ using nlohmann

I have a below json data: { "images": [ { "candidates": [ { "confidence": 0.80836, "enrollment_timestamp": "...
0
votes
3answers
61 views

Create a lambda expression to query data

I created some classes based on the json data in order to deserialize the json data. I would like to access the sku and the skuName using a lambda expression but i am unable to do so. So far I have ...
1
vote
2answers
25 views

Link to string using json

I add new items to a table that come as JSON data. I have a name, price, category, and a link. How can I make it so that when I click on a particular line I visit the link associated with that item? ...
0
votes
1answer
22 views

state district json binding react

I want to display display list of districts from the json, receiving the following error 'TypeError: suggestion.districts.slice(...).toLowerCase is not a function' json file. How can I get the list ...
0
votes
1answer
16 views

How to change format of field from epoh to date

I have a field in data file which is in epoch format.I want to change data in that field into date format. Is there any easy way? https://drive.google.com/open?id=1JRZj8myVu1UHJ3jxZzzb8LSKKMicY0Qi
0
votes
0answers
11 views

Use Fetch API to retrieve JSON data that requires API key and secret

Please bear with me I am new to coding. I am attempting to retrieve JSON data, using fetch API, from an API that requires authentication - both an API Key and secret. I have struggled to find clear ...
0
votes
1answer
13 views

Accessing Nested JSON [AWS Metadata] with Python

I'm using Lambda to run through my AWS account, returning a list of all instances. I need to be able to print out all of the 'VolumeId' values, but I can't work out how to access them as they are ...
2
votes
2answers
45 views

Iterate through JSON array in ionic displaying all data

1- Image link for result of JSON data I have JSON data in an array and I can display an individual part of the array in my HTML code. However, i am unable to display things like display all of ...
0
votes
4answers
48 views

Parse nested json using retrofit in Android

I am getting a Null Pointer Exception. I want to retrieve a random quote from this Quotes Api - https://quotes.rest/ to display in my android application. Where am I going wrong? (I apologise if I ...
1
vote
4answers
57 views

How to remove a specific key in json response

For example I receive a JSON response from postman and store it in a variable. How can I remove a specific key from this response? In my example, I want to remove: head_out_timestam I need this ...
0
votes
0answers
7 views

setting null value for missing keys in JSON to csv

I come across in JSON object that in some records key "score" exists and in some records it does not exists. while converting i need to set the default value for the missing key for that particular ...
-1
votes
1answer
25 views

How to convert bson to json effectively with mongo-go-driver?

I want to convert bson in mongo-go-driver to json effectively. I should take care to handle NaN, because json.Marshal fail if NaN exists in data. For instance, I want to convert below bson data to ...
0
votes
0answers
15 views

Merge FeatureCollection and regular JSON

I have a question about merging a FeatureCollection (with geodata) and a regular JSON file in JavaScript. This is the structure of the files: municipalities.json [ { "county": "Burgenland", "...
0
votes
3answers
28 views

How to Parse a value in a nested JSON using Postman

I am trying to parse the json response from post request and send the parsed data to put request this is my response body { "createdBy": "student", "createdOn": "2019-06-18", ...
0
votes
4answers
42 views

Data not showing at first button click

My app is decoding some JSON data from a PHP web service but the data is not showing on the labels when I click the fetch button for the first time. In debug I can see that the data is passed to the ...
0
votes
0answers
12 views

How to fetch location markers from firebase realtime database and add to map view in Xcode with swift

So I am trying to replace the hard coded version of the array data with a download from firebase realtime database and I want to store that download into 4 separate arrays or 1 array of another array ...
-2
votes
1answer
26 views

How to convert an embedded JSON file to CSV in pandas python

Hi I have received a JSON file with below format, please let me know how do i parse this JSOn file and convert them to CSV JSON file format {'Sections': [{'MC': [[{'IsMandatory': False, 'LD': ...