Questions tagged [json]
JSON (JavaScript Object Notation) is a serializable data interchange format that is a machine and human readable. 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).
360,990
questions
-1
votes
0
answers
6
views
Using T-SQL for extracting from JSON
I am trying to extract data from the following json and pivot the data in "rows" to columns.
{
"tables": [
{
"name": "PrimaryResult",
"...
0
votes
0
answers
10
views
Normalizing Dataframe with a json column
Hi i am looking for a efficient way to normalise a data frame that contains a column with json data.
i get json response from a website that is saved as a dataframe.
The structure is shown below
enter ...
0
votes
0
answers
6
views
How do I send x-www-form-urleconded body parameters in the form of raw text/JSON for use with PowerAutomate?
I've done some testing on an API in Postman and it seems that
**grant_type = client_credentials
client_id = ######
**
are x-www-form-url encoded body parameters - when importing curl command from ...
0
votes
0
answers
9
views
MultiPart Request Spring
How can I make a breakpoint in my api to receive a request with json + file using Spring?
I've already tried using RequestParam, RequestBody and RequestPart, but none of it worked. It works to receive ...
0
votes
0
answers
17
views
AJAX Patch Request returns empty in Laravel Controller
I am trying to update a resource in Laravel sending a PATCH request to my controller.
This is my AJAX call
$.ajax('profile', { // Replace with your actual endpoint URL
type: 'PATCH',
...
0
votes
1
answer
14
views
How can I apply a transformation to a JSON file during build in Visual Studio?
I have a project A (.NET Core) that is referenced by a project B. In project A, I have a JSON file that needs to be updated at compile time (to replace some values) and I would like the JSON file in ...
0
votes
1
answer
21
views
Split results from JSON Outputs
In Azure Logic Apps I am trying to get Teams ID after creating it from the HTTP request. I then used Compose and Parse JSON to see the results.
The outputs will look as follows (shortened version):
&...
0
votes
1
answer
28
views
JQuery - ajax sending array to Spring controller - bad request
I am using Spring 5.3.9, jackson-core and jackson-databind- 2.17.1 version. From UI, I am sending json array to the controller. I have tried multiple parameters types in the controller and none of ...
1
vote
1
answer
28
views
Accessing deeply nested fields using DuckDB SQL
I have some deeply nested data from a json file and I'm trying to load it into DuckDB:
"events": [
{
"id": "401638586",
"uid": "s:40~l:41~...
0
votes
0
answers
19
views
How do I access the minLength property using JSON Pointer?
Given the schema below, how would I access the minLength property to dynamically show the user how many characters are required?
export const schema = {
type: 'object',
properties: {
...
1
vote
1
answer
26
views
Filter JSON keys with wild card
I'm using NiFi for the first time. I have the basics down, but I think I'm making the common error of thinking programmatically instead of set wise.
I'm given the following JSON:
{
"ABC#01&...
-2
votes
0
answers
12
views
Hello everyone, I want to create and publish my own React packages. needed your guidance.thanks
I am interested in creating and publishing my own React packages and would greatly appreciate any guidance or information you can provide. Here are some specific aspects where I need help:
...
0
votes
0
answers
12
views
Requesting FritzBox logfile via Python 'wget' subprocess on Raspberry Pi >> HTML instead of JSON returned
I am trying download the event and WLAN logs from my AVM FritzBox 7350 router (OS 7.57) in JSON format using a Python 3 script. Whilst it works well on my ArchLinux machine, I only get a HTML file on ...
0
votes
1
answer
18
views
Read Response body and assign into one variable in JMeter
I need to read authId value from below response returned by one of the Http Request item in JMeter and assign into in one variable under JSON extractor . "Should I use $.ApiResponse.data.authId&...
0
votes
1
answer
5
views
How to aggregate json columns based on value in PieCloudDB
In my PieCloudDB Database I have a json column like this:
json_col
{"id": 1,"data": [{"col1": "A","col2": "B","col3": "C&...
0
votes
0
answers
20
views
Static import of JSON object specifying the type
I have a small javascript web-application that I develop on my laptop and is later bundled with webpack for publishing.
In some files, some JSON-data is imported right in the "header" of the ...
1
vote
2
answers
41
views
How to handle multiple data sources with credentials when you're deploying AAS model through Azure DevOPS release pipeline
I have a tabular model with two data source connections. Both data sources connect to different servers (and databases) to retrieve data for the tables in the model. Within Azure DevOps, I have ...
0
votes
1
answer
51
views
Сreating multilevel json with the jq utility in a bash script
I get the contents of a text file into an array and then sequentially get the elements of the array and try to add the elements to the json:
#!/bin/bash
JSON=$(jq -n '')
readarray -t array < ./...
0
votes
3
answers
30
views
How can I store the response of my axios get request as json in node.js?
I'm trying to send a request to an api using axios and store the json response in a variable. When I output the response to the console, it shows it, but when setting a variable equal to it and ...
0
votes
1
answer
49
views
can't access json proprety
I'm trying to access the 'city' proprety of this json but somehow it doesn't work , this is the json struct :
"{\"ForSaleShopperPlatformFullRenderQuery{\\\"zpid\\\":28657235,\\\&...
-2
votes
0
answers
19
views
Linter Warning: struct field tag `json:email_addresses` not compatible with reflect.StructTag.Get: bad syntax for struct tag value [closed]
I have the following struct defined:
type User struct {
gorm.Model
FirstName string `json:"first_name" gorm:"type:varchar(32); not null" binding:"required&...
-4
votes
0
answers
26
views
Exporting program instructions into a file that an application can read and execute [closed]
I am writing a web application (let's call it App 1) that allows users to write simple instructions for a separate app (native, lets call it App 2) in a visual manner. Something similar to Google's ...
1
vote
2
answers
61
views
Inconsistency of character indexes while trying to parse multiple JSON in a file
I am using the following code to parse JSON multiline objects separated by comma from a webscraped string stored in a .json file:
import json
def stream_read_json(fn):
start_pos = 0
with open(...
0
votes
0
answers
44
views
Get a specific key and value from JSON
I need something very simple. Sorry I am not familiar with jq and a top novice.
{
"pets": [
{
"name": "Purrsloud",
"species": "Cat",
...
0
votes
0
answers
8
views
Property expansion Soap UI Parameters not working
I am testing the API https://www.deckofcardsapi.com and trying to get a response from Draw request as parameter to another request.
${Draw#Response#$cards[0].code} is not working - I'm getting an ...
0
votes
0
answers
25
views
Remove backslash from escaped forward slash in a string
I have an array(imageURLS) of string in js. Used 'fetch' to send the array as JSON.stringify(imageURLS) to savedesign.php. The array elements are like ['shop/2.png' , 'shop/3.png']. But each elements ...
0
votes
2
answers
42
views
Deserialize JSON objects do different class names
I am using System.Text.Json to deserialize objects from an external API call in C#. I have created the classes for the data and is very straight-forward.
public class DocumentListRoot
{
...
1
vote
2
answers
26
views
How to set a JsonSerializerOptions globally for my httpClient.GetFromJsonAsync<T> calls
In my ASP.NET web API I have httpClient which call GetFromJsonAsync:
var jsonSerializerOptions = new JsonSerializerOptions
{
PropertyNameCaseInsensitive = true,
};
...
0
votes
1
answer
42
views
Kotlin data structure for efficient lookup of nested data
I am currently working on an application that needs to create a mapping between document pdfs and corresponding JSON data files. The files are coming from a third party so I have no control over their ...
1
vote
1
answer
16
views
Jolt Transformation for fetching value of map based on dynamic key
I have input like
{
"searchType": "SR",
"searchTypeMap": {
"SR":"CREDIT_APPLICATION",
"SQ":"CREDIT_QUOTATION",
&...
0
votes
2
answers
29
views
The x field is required error in EF Core requests
If got a controller endpoint expecting a DTO with just a list of Ids to fetch this specific list of IDs. When sending the following request to the endpoint, it returns an error
the idList field is ...
0
votes
0
answers
6
views
Error with Express.js library with res.cookie, res.json, res.status, req.headers
Errors appear in the code:
Property 'cookie' does not exist on type 'Response any, Record string, any
Property 'json' does not exist on type 'Response any, Record string, any
Property 'status' does ...
0
votes
0
answers
15
views
Typescript json require() function isn't reading directory from a variable
I have a variable jsonDir which is equal to "./smallsample.json".
The following line
const data = require(jsonDir);
Always raises the error Error: Cannot find module './smallsample.json'
...
1
vote
2
answers
35
views
Jackson Deserialization - Treat specific string values as being null
I am working with an external API and have generated the Java client classes using the OpenAPI generator. One of the fields defined in the response is marked as being of a date type as shown below and ...
0
votes
2
answers
47
views
Azure Data Factory Expression Builder: Error Structuring JSON with Nested Arrays and Objects
I've been working on this for a couple of days now and am reaching out for assistance. I was unable to structure the format properly and need help.
I've been trying to create a JSON structure in Azure ...
0
votes
1
answer
34
views
How to load a image from a nested JSON file into react along with other content
I have recently encountered a problem while trying to load a image from my nested JSON file. the image is loaded along with other JSON content in a accordion but for some reason the image loads with ...
-1
votes
0
answers
23
views
Alma Linux VS Code C++ Application.json and task.json - cannot debug code
I am getting an error when I try to debug. the application.json and tasks.json both are giving me an error here is what I got
I install gcc for linux and I am on Linux Alma.
Application.json
{
"...
0
votes
0
answers
41
views
MongoDB aggregate: $match should return documents for an unique property
I have a collection, where I would like to write a query to have records based on a condition that should return records for unique itemId, but still I don't know the value of itemId. Here are some ...
0
votes
2
answers
37
views
Mock and verify request object passed to PostAsJsonAsync
Is there are way to verify the request object passed to HttpClient.PostAsJsonAsync. The request object is constructed inside the method to be unit tested. Therefore I need to verify that the request ...
0
votes
1
answer
34
views
change string to object
how to change string to object
{'username': [ErrorDetail(string='A user with that username already exists.', code='unique')], 'email': [ErrorDetail(string='user with this email already exists.', code='...
0
votes
1
answer
22
views
How to return JSON objects without explicit aliasing in postgresql
If I have two tables and I join them, can I return one of the values a JSON object, without having to specify all the fields?
For example, the following works:
SELECT u.*,
json_build_object(
'name', ...
-2
votes
1
answer
65
views
Escaped Double Quote in Swift breaking JSONDecoder decode
If you open a play ground and paste this code, you'll notice that the decoded object is nil. The JSON object [{"transcript":"A person might say, \"Hello\"."}] passes any ...
0
votes
0
answers
10
views
Monaco editor slow performance with large JSON schema
Does anyone know how I could improve the performance of Monaco Editor when using a large JSON schema file, provided via JS in the diagnostic options. If I provide the same JSON schema inside VS Code ...
1
vote
1
answer
24
views
Convert Flat json to tree with Nested array
I'm trying convert JSON by NiFi JOLTTransformRecord processor to tree with nested array.
But I am having some trouble with converting the flat JSON to Nested JSON. I have looked at examples and didn't ...
1
vote
3
answers
48
views
jq: assigning to computed property of an object
I'm trying to get jq to generate an object whose keys are computed.
This didn't work:
$ jq -n --arg key foo '{} as $o | $o[$key] = 42'
jq: error (at <unknown>): Invalid path expression near ...
1
vote
1
answer
66
views
Query to parse JSON using openrowset converting special characters
We are trying to process a JSON document using SQL Server 2019. When using the below query to parse JSON document with openrowset its converting special characters. For instance (Ó or Ñ) are converted ...
1
vote
1
answer
51
views
Go JSON differentiating zero values vs null vs undefined
I know Go JSON issues are a-dime-a-dozen; the existing stdlib JSON package is clunky. There is ongoing discussion about a v2. Until then, I'm hoping someone can lend some inspiration here on how to ...
0
votes
1
answer
50
views
How do I deserialize JSON in Rust when combining a flattened component with the need to convert keys?
I apologize for somewhat unclear question, but I can't really phrase it well with one sentence. Below is a toy example illustrating the problem:
use serde_json;
use serde_json::Value;
use serde::{...
1
vote
2
answers
21
views
How to sort order of stacked bar
I am trying to create a stack bar chart in Vegalite.
my requirement is specific i want to stack the bar in the same order as in legend (legend are in order as data ) , i want to stack bar from ...
0
votes
0
answers
12
views
json.dump() adding backslash when double quotes are added in python dictionary
I'm reading data from excel have say proxid as field which contains Multi-values ie.
proxid --> ABC-123,PQR-456 (data seperated from comma)
My task is to read the data and convert this data in ...