15 questions from the last 7 days
2 votes
0 answers
23 views
How to escape 'properties' in JsonSlurper in Groovy 5?
In Groovy 4.x it was possible to escape the 'properties' keyword when using JsonSlurper using getAt('properties') like below: import groovy.json.JsonSlurper def json = new JsonSlurper().parseText(&...
Best practices
0 votes
1 replies
24 views
Is it normal to send a JSON response with a list of objects where the properties of the objects differ based on their type?
My client has requested that I provide a response from my API that looks like the following: { "entity_type": "company", "registered_date": "2020-01-01",...
0 votes
0 answers
13 views
How can I use a custom Date deserializer for Json RequestBody?
I'm using Spring MVC and I would like to control the deserialization of Date objects in RequestBody. I saw I can set a custom JsonDeserializer in the input object, but I would like to set a global ...
1 vote
3 answers
56 views
How do I use a json array to search and extract matched values from a different json array in mariaDB?
Situation I have two tables. ing_master is a master list of ingredients; pdet is a product table, with an ingredients field formatted as json array. For each product's ingredient list in pdet, I want ...
-7 votes
0 answers
46 views
Converting PDF->json [closed]
I’m trying to convert PDF’s into json files (using docling in python). The problem is I’m very inexperienced with json files. Whenever I try to transform the json files, there are too many nested ...
0 votes
1 answer
23 views
Redshift PartiQL for unpivoting the keys and values in a Map typed SUPER
AWS documentation for querying Redshift's super is very much all in on supers that are arrays. But, I happen to want a super that is a map, as I'm sure a number of people do, and I would like to then ...
0 votes
0 answers
54 views
Can I send a JSON object to BigQuery without stringifying it?
I am trying to figure out if there is a way to send a JSON object to a BigQuery table that has a column of type JSON. I know the current practice is to stringify the JSON and send it over which gets ...
Advice
0 votes
2 replies
63 views
System.Text.Json Polymorphic Deserialization not binding Type Discriminator property
I'm trying to do a polymorphic deserialization using System.Text.Json in net-8.0. Here is my schema. [JsonPolymorphic(TypeDiscriminatorPropertyName = "type")] [JsonDerivedType(typeof(Manager)...
-2 votes
1 answer
45 views
Why am I getting “TypeError: list indices must be integers or slices, not str” when accessing a JSON response in Python? [closed]
I'm trying to access specific values from a JSON response in Python, but I keep getting the error message: TypeError: list indices must be integers or slices, not str I understand it has something ...
0 votes
0 answers
27 views
I am using JupyterLite to run some python code. And there is a specific cell which is not executing as desired
When I run the cell below, and there is no file with the same name as filename, it executes perfectly. But on subsequent runs, if there exists a file with the same name, the kernel gets busy and ...
Advice
0 votes
0 replies
24 views
Exporting Azure synapse workspace artifacts
Just came across a task and had to do some digging to find the answer: How to export Azure Synapse artifacts, more specifically pipelines, conserving their folder hierarchy, when Git integration is ...
0 votes
0 answers
23 views
Slack files.getUploadURLExternal API returns “missing required field: length / filename” even though fields are provided
I'm trying to migrate from the deprecated files.upload API to the new Slack upload flow using files.getUploadURLExternal. According to the documentation, the request should include a filename and ...
1 vote
1 answer
80 views
Python, parse nested JSON to make it flat for CSV
I'm trying to store API output into CSV/db and can not figure out how I can make for those Key in "tierList". One row in my case should be on bin and I need key as a columns in my output. Is ...
-5 votes
1 answer
87 views
Why does OpenAPI output validation fail for an endpoint but not for others?
I want to create an asynchronuous OpenAPI interface. Async jobs return a 202 and a location header to query later. This is my OpenAPI document: --- components: headers: JobLocation: ...
-2 votes
0 answers
43 views
Finding the end of json file with std::getline [duplicate]
This is probably a dumb question, and I probably put in the wrong question type on accident, but what delimiter do you use when you need to stop at the end of a json file, but not whitespaces using ...