360,486 questions
-2
votes
0
answers
65
views
Tkinter notes app not saving to JSON file — notes disappear on restart [closed]
I am building a Google Keep-style notes app in Python using tkinter. Notes appear on screen while the app is running, but when I close and reopen it they are gone. The JSON file is either not being ...
Advice
0
votes
4
replies
64
views
Dynamic data fetching system
I am trying to write my first project using python which is a recipe administrator, which contains a programm that fetches url given a keyword, and fetches them back and add them dynamically to a ...
Tooling
0
votes
8
replies
66
views
What is the easiest way to convert nested JSON to Python dataclasses automatically?
I'm working with complex nested JSON responses from an API and want to convert them into strongly-typed Python dataclasses for better code completion and type safety.
Currently, I'm manually creating ...
0
votes
1
answer
63
views
Optimizing Python CSV parsing for memory-constrained environments (Bypassing the "Object Tax")
I'm working with large CSV datasets (10M+ rows, ~400MB-1GB) on low-resource cloud instances (1GB-2GB RAM). Standard pandas.read_csv is causing MemoryError because the "Object Tax" (wrapping ...
Advice
0
votes
3
replies
63
views
How to paginate and process large JSON API responses in Python without hitting errors or duplicates?
I am working with a REST API that returns a large JSON dataset (hundreds of thousands of records). The API supports pagination using parameters like startIndex and resultsPerPage.
I am using Python ...
Advice
0
votes
5
replies
54
views
How to validate the request and return errors properly in a REST service?
A client sends a request to the server, e.g. POST /companies, where the request body looks like that:
{
"name": String (unique),
"ownerId": Long (fk)
}
When I validate the ...
-2
votes
1
answer
107
views
create dictionary from json [duplicate]
I have some json that looks like this:
"lines":
{
"0010": {
"ProvCountyCode": "047",
"ProvNo": "770887",
"...
0
votes
0
answers
33
views
QMetry DELETE API fails with application/json but works with multipart/form-data (Jersey MultivaluedMapImpl error) [closed]
I am facing an issue while triggering a DELETE API from QMetry when the request Content-Type is set to application/json. The same API works correctly for GET and POST requests using JSON.
Backend: ...
Advice
1
vote
6
replies
148
views
How can I write this code in a more professional way?
I'm currently working on a small project to practice (as you'll see from my code, I'm a beginner). The goal is simply to create a mini online library where I can add, delete, and view my books, and ...
0
votes
1
answer
182
views
Remove a dictionary from a list [closed]
I'm building a simple book manager with features to add, delete, view, and search for books.
This seems like a good project for me since I'm a beginner. But I'm stuck on task 2, which is deleting a ...
Advice
1
vote
5
replies
108
views
Create a book manager with a json file using python
I'd like to create a kind of book manager where, at the start, I have a menu with several options, such as adding a book, deleting a book, viewing my library, or searching for a book.
But I'm not ...
0
votes
2
answers
144
views
QJsonDocument and IEEE 754 doubles
im actually working with QT 5, using QJsonDocument, I need to save correctly formatted double into my Json Document, i tried several ways to format correctly, this is the way I ended using :
...
3
votes
1
answer
217
views
Missing fields during serialization after upgrading Jackson 2 to Jackson 3
I migrated from spring boot 3 to spring boot 4 and I have an issue with the JSON created by Jackson.
The response is like this:
public class MyResponse {
private List<MyData> data;
...
Advice
0
votes
2
replies
76
views
How many JSON objects can you nestle into each other?
Just started learning JSON with C# and i was wondering how many objects you could nestle into another object?
My best guess would be 255.
Also, is this a common practice in actual websites? I have not ...
1
vote
1
answer
61
views
How to write a JSON string into an in-memory table in DolphinDB?
I am trying to fetch JSON data from an HTTP API and convert it into an in‑memory table in DolphinDB. The JSON response is an array of objects, and I want to store it as a table where each object ...
0
votes
1
answer
76
views
WSO2 MI – Error Could not write JSON stream when handling base64 payload
I’m working with WSO2 Micro Integrator and exposing a PATCH API that receives a base64 document in JSON payload, then forwards it to a backend service.
<resource methods="PATCH" uri-...
0
votes
1
answer
92
views
How can I iterate through a JSON file with PHP and access the second element of the file? [duplicate]
I have a JSON file with geo coordinates and some features like this:
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
...
Best practices
1
vote
12
replies
304
views
Best way to go from JSON to bash variables
I am writing a bash script, for educational purposes.
So I was thinking what is the best way to parse JSON and write the JSON attributes to bash variables.
In my script, I am making an API call that ...
Advice
1
vote
2
replies
84
views
Does JS usage affect my website's security
I'm a newbie and I have used JS in my API integrations and most of the the things on my website. I am curious if people can manipulate the packages and find out my API keys/secrets.
I have SMS API, ...
Advice
0
votes
1
replies
117
views
Why is there no `orient=table` option for `pandas.DataFrame.to_dict`?
I'm trying to save a pandas.DataFrame object to disk, as a JSON. The slight complication is that I need to store some additional data alongside it. So my intended JSON would be
{
"...
2
votes
2
answers
149
views
Python json normalization - nested structure
I am learning to process what i consider a complex json structure and am trying to load this into a dataframe. I want a single record for each outcome id. Here is the sample json structure
{
&...
1
vote
1
answer
102
views
How can I send a POST request with a CSRF Token and a JSON body to a Django endpoint? [duplicate]
I'm developing an Android Studio app which talks to a server running Django. I'm in the process of implementing the login process on the phone, however the server always returns 403 Forbidden to my ...
0
votes
1
answer
105
views
JSON cannot be parsed as the type Int32
When sending a POST on Robot Framework I got this error:
Message: There was an error deserializing the object of type ContentDirect.CoreService.Contract.Message.SubscriberManagement....
Best practices
1
vote
5
replies
119
views
How to sort my functions in python code with regards to efficiency
I have a code in python, multiple files. Is it better to merge them into a file? Is it better to split class and non-class code? And if I do have them in one file with global variables, how to deal ...
-5
votes
0
answers
56
views
How to force a specific field order in JSON output using Jackson? [duplicate]
I need my JSON output to show the "idTransanction" and "details" fields first for logging purposes. Currently, Jackson alphabeticalizes them or follows a random order. Is there an ...
Advice
0
votes
9
replies
103
views
dict of count JSON
I have tried to make a a function get_statistics to make a dictionary of the JSON persistence. I started doing it manually, but it wants me to do it automatically. Currently stuck making my code of ...
3
votes
0
answers
125
views
Android-Retrofit: getting escaped double-quoted JSON
I'm having problems receiving a JSON response from a REST endpoint using Retrofit. Some of the requests return JSON with a bunch of null characters and escaped double quotes.
Pasted from Android ...
Best practices
0
votes
3
replies
122
views
mtgjson.com usage recommendations
https://mtgjson.com/
I am currently building program for MTG, Magic the Gathering that is used for Cube Building. I have been using API calls to Scryfall ( scryfall.com ). This has been working so far ...
Best practices
0
votes
1
replies
67
views
Best practices for structuring LLM prompts to extract multi-dimensional emotional metadata from dream narratives?
I am building DreamEcho AI, a platform that uses NLP to track mental states through dream analysis. I am using a Large Language Model (like GPT-4 or Gemini) to process raw user dream journals.
The ...
0
votes
0
answers
118
views
How to access a JSON file in WWWROOT folder of Blazor application?
I have a Blazor application, developed in Visual Studio 2022. It loads a JSON file (data.json) that I have placed in the wwwroot folder.
Everything that I have read (searching for help) shows that I ...
Best practices
0
votes
0
replies
71
views
Seeking perspective for JSON ingestion into AURORA?
Seeking perspective for JSON ingestion into AURORA?
======================================
I appreciate you looking over my query. This question pertains to the AWS AURORA environment, and I'm asking ...
1
vote
1
answer
101
views
How to release a file written with JsonSerializer.Serialize(Utf8JsonWriter)?
I'm testing a method that reads a JSON file. So in the setup, I first create said JSON file, like this:
string pathOfRelevantStuff = "path";
string fileOfRelevantStuff = Path.Combine(...
5
votes
2
answers
236
views
Converting a PHP object array to a JavaScript object array
First, I retrieve data from the database using PHP oop and store it in a variable named $details. The result in $details is an array of several objects, usually about 7 in total. Each object within ...
Best practices
4
votes
0
replies
109
views
What are best practices for using AI tools in production without over-relying on them?
I’ve been integrating AI tools (mainly large language models) into parts of our workflow things like content drafting, code suggestions, and internal automation
While the productivity boost is real, I’...
Best practices
0
votes
4
replies
75
views
BizTalk Server 2020: Best practice for exposing HTTP POST endpoint to receive JSON and write to file (HTTP adapter vs WCF-WebHttp)
I am completely new to BizTalk, so please excuse if this is a basic question.
I am working with BizTalk Server 2020 and my goal is fairly simple:
Expose an HTTP endpoint on the BizTalk server
A ...
Advice
0
votes
1
replies
62
views
How to export and use Google Earth Engine results for geospatial analysis?
I'm new to geospatial data analysis with Google Earth Engine and I'm not yet sure how to process the data or how to retrieve the results for use elsewhere. What are the best practices for exporting ...
1
vote
1
answer
135
views
Optimizing Exact Filtered Pagination Count (COUNT(*)) on MySQL with Dynamic JSON Filters in Spring Boot API
Problem Statement:
We are running a Java/Spring GET/POST getAll pagination API on top of MySQL in AWS RDS and need help optimizing exact filtered counts
Current state:
The main dataset is courses with ...
1
vote
1
answer
71
views
How to apply Bean Validation constraints after JSON Patch in Spring Boot?
I am implementing a PATCH endpoint in Spring Boot using JSON Patch (com.github.fge:json-patch). The patch is applied successfully, but Bean Validation annotations on my entity (such as @NotBlank, @...
5
votes
1
answer
183
views
How do I prevent JSON deserializer converting a date value in a DataSet when the first row is NULL
I am aware of the issue when deserialising date values in JSON strings that represent a System.DataSet when the first row contains a NULL.
Compare the two strings:
"{\"Table1\":[{\"...
0
votes
1
answer
93
views
JSON parsing error in Studio with Fabric SQL - app works perfectly when published?
My Power Apps connects to Microsoft Fabric SQL Analytics Endpoint via DirectQuery. The published app works flawlessly - zero errors, perfect data display, users love it.
Power Apps Studio shows on ...
0
votes
2
answers
108
views
How to return a JSON object with JSON_OBJECT or JSON_ARRAYAGG
I like to compose a JSON from some table data, I do it like this:
DECLARE
res JSON_OBJECT_T;
ja JSON_ARRAY_T;
ret CLOB;
CURSOR cur IS
SELECT JSON_OBJECT(
KEY 'name' VALUE ...
0
votes
0
answers
42
views
Trouble with coding a modal that displays when a specific div is clicked [duplicate]
I know how to make a modal appear on click but for some reasons, i don't seem to be able to understand how to incorporate that on y aldready established functions.
basically I have two functions: One ...
1
vote
1
answer
180
views
Using jq how to correctly read a pair containing a backslash character?
I have a script with reading from json file in this way:
jq -c '.[]' input.json | while read pair; do
echo "$pair" | jq -r '.[0]'
done;
The above throws `parse error: Invalid numeric ...
0
votes
0
answers
62
views
OPENROWSET and inserting JSON payloads [duplicate]
I'm trying to build a stored proc for a JSON payload file for a table for further work in that stored proc.
I would like to parameterise the exec to something like @MyJsonFile
SQL Server gives me an ...
Advice
0
votes
1
replies
81
views
Create an X word combination linked to a specific set of data
To start, here is an example:
When a messenger app wants you to share your contact information, they assign you a random 4-6 word combination (e.g. TIGER-TRUCK-FIRES-GHOST-TILES) that acts as a human ...
1
vote
1
answer
47
views
Determine table column in DataTables based on row data
I am trying to create to figure out how to created the first table column in "ten99" based on the data that is in the rowData. For example if the "ssn" field on each row is not ...
Advice
0
votes
2
replies
50
views
JSON Database for login details
Can we use JSON for storing login details just for the basic projects?.... ....................................................................................... . ................. . .. ... ... . ....
0
votes
2
answers
94
views
JsonPath nested conditions
I have this sample json
{
"accessRequestId": "2c91808b6ef1d43e016efba0ce470904",
"requestedBy": {
"type": "IDENTITY",
"id&...
4
votes
1
answer
101
views
How to map different JSON field names to a unified structure in Python?
I’m working with JSON data coming from multiple external APIs.
The data is semantically the same, but field names and structures differ between sources.
For example:
data_a = {"event_time": &...
0
votes
0
answers
112
views
How to handle LONGBLOB-type fields in gbase database?
There is a LONGBLOB-type field in a table that actually stores JSON-formatted data (as shown below).
Column Name
Data Type
user_id
INT
id
INT
harbour_name
VARCHAR
name
VARCHAR
type
VARCHAR
properties
...