360,133 questions
Score of -6
1 answer
116 views
How can I validate a specific field in a JSON response using Postman?
I'm testing a REST API using Postman and want to verify that a specific field in the JSON response contains the expected value.
For example, the API returns this response:
{
"id": 101,
&...
Score of -6
0 answers
141 views
How to correctly parse a nested JSON list using jsonlite::fromJSON in R without dimension or length replacement errors? [closed]
I am parsing a JSON file in R using the jsonlite package. The JSON structure has a top-level key containing a list of objects, where each object represents a province name and its demographic data.
...
Score of -10
0 answers
148 views
How to request JSON data from NYT, BLS, Census, and NewsAPI using Python requests? [closed]
Question
I am practicing how to retrieve JSON data from several public APIs using Python.
I currently have API keys for:
New York Times Article Search API
U.S. Bureau of Labor Statistics (BLS) API
...
Score of 0
2 answers
89 views
How can I make chrono::year work with simdjson deserialization?
With simdjson, I could not make it read a value in json format and store it in a std::chrono::year variable.
Apparently, it does not recognize "year": 2018 as a valid format for chrono::year....
Score of 1
1 answer
66 views
Elastic Security webhook connector fails to push a case when `{{{case.id}}}` is used
I’m integrating Elastic Security with a Flask/Python application (receiver.py). I want the webhook connector to send the case ID and other case metadata to my application so it can look up the case ...
Score of 1
1 answer
180 views
Most efficient way to extract one field from a JSON string column in Spark (8–10B rows)
I have a Spark (Scala) DataFrame with about 8–10 billion rows. One column, meta_json , holds a JSON string. I need to pull out the label field as a new column.
Sample data
+----------+--------+-----...
Score of 0
0 answers
64 views
Monaco Editor JSON validation ignores unknown properties when they are declared through allOf / if-then-else (unevaluatedProperties: false)
I'm using Monaco Editor (via ngx-monaco-editor in an Angular app) to let users edit application settings as JSON.
The JSON is validated against a JSON schema registered with setDiagnosticsOptions.
...
Score of 2
1 answer
191 views
Dynamic configuration from appsettings at runtime
My solution is an Aspire launcher into an ASP.NET application that I want to set up to allow for programmatic injection of some configuration. I've attempted to research how to do this, but the info I ...
Score of 2
1 answer
106 views
How to convert a genome-scale model in .json format into an SBML/MATLAB file (.xml/.mat format)
I have a genome-scale metabolic model (a.k.a. GEM) made by other people who are not a part of my lab, and I would like to use it. The problem: it is in the .json format, and I need it to be in the ....
Score of -3
0 answers
107 views
How to use the function 'texts_to_sequences' from tensorflow, Tokenizer package?
Importing packages
import json
import random
import numpy as np
from nltk import word_tokenize, pos_tag
from nltk.stem import WordNetLemmatizer, PorterStemmer
from tensorflow.keras.models import ...
Score of 1
1 answer
223 views
How should a JSON parser represent JSON numbers in Go?
I'm implementing a JSON parser. According to JSON rules, a number can be an integer, a negative number, a decimal, or use exponent notation, like
42, -42, 3.14, 0.5, 1e10, 2.5e-3
I currently have a ...
Score of 2
3 answers
287 views
Setting multiple environment variables that already exist inside another variable
I'm using jq within a bash script in Ubuntu to create a list of environment variables. These variables will be utilized further on in the script.
This is a rough approximation of the JSON:
{
"...
Score of 0
1 answer
246 views
How can I detect that an integer literal will lose precision in JavaScript?
The JSON number type does not distinguish between integers and floating-point numbers; once processed by JSON.parse, all numbers become JavaScript Number types (i.e., IEEE 754 double-precision floats)....
Score of 3
2 answers
140 views
Running into build wheel error installing specific version of Frida, unsure how to proceed
I am currently trying to install a specific version of frida (12.2.1) and keep running into a build wheel error (see below for entered prompt & errors). I am working in windows 11.
I should also ...
Score of 0
1 answer
78 views
Ktor: io.ktor.server.plugins.BadRequestException: Failed to convert request body to class
I have a Ktor server that, upon receiving a request body.
val day = call.receive<Day>()
gives me the following error:
io.ktor.server.plugins.BadRequestException: Failed to convert request body ...