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).
361,102
questions
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
1
answer
23
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
1
answer
26
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'
...