Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [json]

JSON (JavaScript Object Notation) aka the Fat Free Alternative to XML is a lightweight data exchange format inspired by JavaScript object literals. It is often used with JavaScript, Ajax, and RESTful web services but is completely language independent.

Filter by
Sorted by
Tagged with
0 votes
1 answer
103 views

Storing Data For Consumption in Python

I have a program which needs some constant data, in JSON-like format. However, this data only needs to be consumed by my Python program, and by making it Python code, I can include types like datetime....
pigrammer's user avatar
  • 111
0 votes
0 answers
210 views

Improve return type for CRUD GET list or details objects

When creating the crud GET methods to get a list of items, or the details, what should I return? The whole object properties for both cases? Or just the properties that are necessary? I'm asking this ...
celsomtrindade's user avatar
10 votes
5 answers
3k views

How do you fix the wrong-case-sensitivity dictionary setting bug-pattern?

There is a coding anti-pattern I've noticed (while using .Net). You declare a data class, which is supposed to have a dictionary field (or get/set Property), and lets call it 'Properties', for the ...
Tim Lovell-Smith's user avatar
1 vote
1 answer
456 views

JSON: RFC8259 Escape forward slash or not?

It seems that the RFC8259 and ECMA-404 definitions of JSON are unclear on the escaping of solidus, aka forward slash. RFC8259 states: Any character may be escaped. All Unicode characters may be ...
Daniël van den Berg's user avatar
1 vote
1 answer
63 views

Efficient Schema For Pairing Styling Metadata with Text Fields in JSON Messages

I am trying to design a schema for pairing styling data with text. However, I need it to pair styling metadata to only one part of a larger string. For example: "This is a test string" I ...
CCD's user avatar
  • 143
2 votes
1 answer
876 views

Best practice/design pattern for working with a config file

I am writing an application where a user will have a custom config json file. The json is just a dictionary where they define new objects of the exact same type. Here is an example with outfits: '...
Ryan Folks's user avatar
0 votes
1 answer
1k views

Dynamic Variables from JSON Parameter File

I want to assign Python variables imported from a JSON file. This question had an interesting answer using a classmethod, but I couldn't get it to work and I'm not allowed to comment... So, let's ...
Liz Livingston's user avatar
0 votes
1 answer
292 views

Handling a numerical value that may be specific or a range in a REST API

Let's say I have a REST API that needs to return the width of an object, but that width may either be a specific value or a range of values. What would be the best practice for designing the API to ...
jem473's user avatar
  • 11
1 vote
1 answer
151 views

Can a REST API response include a reference and preview data

Let's say I have a REST API with resources that look something like this: /users/<id> { "id": <str:user_id>, "firstName": <str:first_name>, "lastName&...
NotBadJon's user avatar
1 vote
0 answers
967 views

Versioning JSON data in db

I'm curious if there are any obvious pitfalls to the following: I have a database table that, because it is storing many objects of various subclasses, I'm using a JSON field to hold the non-...
Adam Jones's user avatar
-1 votes
2 answers
121 views

Best practices for API design for an E-Commerce System

I have a few basic questions on how to implement an API for a basic e-commerce system. The relevant entities are Customer, Puffle, and Review. Each Puffle can have zero or more Reviews. Each Review is ...
Richard Robinson's user avatar
8 votes
6 answers
6k views

How should an API handle unsupported fields?

Let's assume I have this API on /api/v2/persons that enables me to create new entries by POSTing this JSON: { "name": "me" } The API is implemented using Spring Boot and if ...
Marged's user avatar
  • 225
0 votes
1 answer
781 views

Constantly writing a JSON file [closed]

I need to write continuously into a JSON file in C++. The format and structure are defined as requirement. The data is produced in the process itself and needs to be stored multiple times per second. ...
da-chiller's user avatar
-2 votes
2 answers
193 views

Avoid redundant field using JSON type in MySQL [closed]

I have experienc with designing relational dbs but first time attempting to store JSON in a mysql table. I am using mysql 5.7.8 which has the ability to store json data type as a column. When I create ...
simgineer's user avatar
  • 139
2 votes
1 answer
298 views

Best practice for designing a WebAPI for exposing data in a SQL database interacting with C++ and C# applications

I am looking for general guidance or any relevant links for a complex project. We are a small business that sells a construction materials testing software. The client is a Windows application with ...
Hottemax's user avatar
  • 129
1 vote
1 answer
2k views

How do you pass enums between microservices, without need to have copies of enums in different services?

I'm working with microservices, and I see an issue. There are two services, that transfer info between each other via jsons. Because of this, we have to store our enums in strings, and serialise-...
keldranase's user avatar
2 votes
1 answer
448 views

SQL for storing hierarchical data

I have a UX that is modeling a hierarchy. There is a concept of a section, a sub-section under a section, a panel under a section and a bunch of form-fields under a panel. The UX exposes an ability to ...
thispatchofsky's user avatar
1 vote
2 answers
49 views

Does it make sense to refer to a user created label for an object as an ID?

Currently working on a project where the user will create a JSON file that's then read into the system. The fields of one object can be referred to in another object for relevant operations. Something ...
user6490576's user avatar
0 votes
3 answers
1k views

How to design RESTful API for response object properties dependent on request parameter

I have a RESTful service where clients provide product codes, start date and end date. In response, the service returns a list of price metrics for the products over the date range. Start date is ...
James's user avatar
  • 285
3 votes
7 answers
3k views

Representing a large list of complex objects in JSON

I am currently developing an API that returns JSON structures. One of the domain objects returned is a time series, which is a potentially large list (many thousands of elements) of complex objects. ...
Felk's user avatar
  • 194
-2 votes
2 answers
1k views

How to best manage multilingual information in documents in JSON/MongoDB/Mongoose?

I have to manage multilingual information in JSON documents in a MongoDB/Mongoose context. But I'm in a dilemma regarding best the format to use with a view to performance metrics: I'm currently ...
The Neighbors Kid's user avatar
0 votes
1 answer
72 views

Running ad hoc queries on JSON log files

I have a situation where let's say I have a folder called logs which has N folders. Each folder contains events for a specific event type and each folder has N .log files where each file has multiple ...
Sriram R's user avatar
1 vote
1 answer
773 views

Sharing types & endpoints between frontend & backend [closed]

I'm looking for a clean solution to share types, endpoints and response format between a backend and frontend. The backend will be in Python & the frontend in Typescript. The backend is a REST API....
mlisthenewcool's user avatar
1 vote
1 answer
743 views

Java REST services - What are best practices regarding DTOs?

I've been working on a project that communicates with a service which sends very complicated REST responses. Current "best practice" on this team is that we use POJO DTOs to handle all data ...
Astrum's user avatar
  • 143
0 votes
1 answer
446 views

How can I represent a graph for a visual programming language in JSON?

I am in the process of implementing a visual programming language similar to Blender's node editor or Unreal Engine Blueprints. It will be implemented as a SPA that will communicate with a JSON based ...
joe's user avatar
  • 111
-2 votes
1 answer
164 views

Can I manage a NoSQL database with only JavaScript?

I am creating an app with Deno (a personal project), and I manage the "database" with only the Javascript code of the Deno enviroment, modifying JSON files like any other JS object. For me, ...
Imagitori's user avatar
1 vote
2 answers
1k views

Performance strategies for repeatedly iterating through large JSON files

I'm designing a project which will require iterating through a foreign language dictionary in JSON format. The idea is clicking on a word in a text will trigger a search on the JSON file for a match. ...
souser's user avatar
  • 121
0 votes
1 answer
75 views

Index all fields of json documents in a desktop app without server or service

We have a .NET Core application that works as a datawarehouse and we store our entities in json documents that we regroup by projects. Usually projects would easily have 300k json documents with 50 to ...
mwryl's user avatar
  • 145
1 vote
1 answer
707 views

Semantic meaning of empty list parameter in JSON API request

I'm attempting to find some authoritative references to address this particular scenario. References to best practices guides would be helpful, specifications even more so. The scenario in question: A ...
Kal Zekdor's user avatar
1 vote
1 answer
479 views

How to represent Spacial Time Series data in json clearly?

Currently, I have an application generating time series spacial data. The data is weather data with coordinates and a time of reading. I would like to receive chunks of the data in a time series way ...
apollowebdesigns's user avatar
-3 votes
2 answers
3k views

Sending JSON in body of an email

Basically, in our scenario, data has to be sent from a WordPress form to Dynamics 365. My current approach is putting it into an email body in JSON format, that is then extracted and further processed ...
Khadim Ali's user avatar
-1 votes
1 answer
814 views

Best practice to flatten JSON object and store it database

I'm fetching data from Clockify, flattening the JSON response, and storing it in the database where each property on the API response should have its own table's field. I have read this article about ...
Danish's user avatar
  • 113
0 votes
1 answer
156 views

Redesign json structure to reduce duplication of ids

I have json like below in our legacy system. In general, my json is very large. To make things simpler and easier to understand I have reduced the entries. { "clientSettings": [{ ...
David Todd's user avatar
-2 votes
4 answers
394 views

Is there a name for the data structure [object, list, primitive] e.g. JSON? [closed]

tl;dr - I've settled on the terminology Traversable for the container type which includes List and Dict but excludes str, and Atom for anything which is not traversable, e.g. cannot nest indefinitely. ...
DeusXMachina's user avatar
4 votes
5 answers
2k views

What is the normal form of JSON?

This is going to sound like a trivial question, but I like to think it's actually a deep one. The simple quesiton is, "What is the normal form of a typical JSON object?" For reference, I ...
James Madison's user avatar
1 vote
1 answer
155 views

Consuming complex JSON service that does not have schema

Hi I have this weird situation where I have a JSON producing service that represents a very complex object graph and this bject graph does not have a JSON schema that it is based on. The reason for ...
Alexander Petrov's user avatar
0 votes
1 answer
54 views

Architecture question: Match addresses in different JSON schemas

I had to move houses recently and I found that it is tedious to check every potential place's broadband coverage. For that reason I want to build a website where you can check which broadband options ...
btzs's user avatar
  • 101
-2 votes
1 answer
66 views

RestAPI different json for list of items and item details

I have a RestAPI with two endpoints: /items - list of items /items/2 - selected by id, an item details returned json for list of items is { "id": "1", "name": "Max&...
Blazej SLEBODA's user avatar
2 votes
1 answer
2k views

Storing static data idea — is it best practice?

I have a database in which I am storing a bunch of companies that can have several different types of codes associated with them — here is a example of a group of codes I was wondering if storing them ...
Jamie's user avatar
  • 139
-5 votes
1 answer
51 views

How is data stored prior to downloading?

I go to several sites that offer their data in XML, JSON, CSV formats. As shown here, https://www.space.org/basicspacedata/query/class/boxscore/format/csv, I choose the format. Question is how is ...
Barry vT's user avatar
  • 101
-6 votes
1 answer
143 views

Are aspects of domain driven design limiting when we scale?

From what I have read about the domain driven design, an aspect of it is that there is a clear separation between domain objects and DTOs. So the application level components deal with domain objects ...
Jim's user avatar
  • 327
1 vote
3 answers
5k views

Is it bad practice to in a REST API to use Form Data in POST requests when all responses are in JSON?

When developing a REST API, is it ok to use Form-Data in POST requests or is that frowned upon? All my methods return a JSON body or only an HTTP code, should this be extended to my POST and PUT ...
BaraKanske's user avatar
1 vote
1 answer
117 views

Should I perform some minor denormalization to save myself several queries in the future?

I'm in charge of designing the entire backend for the REST API of an application that works more or less like an online browser game (think OGAME, Travian, and the likes). In this game, players are ...
neirenoir's user avatar
5 votes
4 answers
4k views

How to stream JSON using HTTP instead of pure TCP

If we have a long list of JSON entries, we could put those on an HTTP body so we could parse the whole body of JSON with something like JSON.parse(): HTTP/1.1 200 OK Date: Sun, 10 Oct 2010 23:26:07 ...
Alex Channelmeter's user avatar
0 votes
2 answers
101 views

How to use strict schema with seemingly fluid data type

Our company is trying to find a good generic way to have Many-to-One data for an entity. For example, a user might have 1 primary email, but many other emails also attached to their account. So we ...
Alexander Mills's user avatar
3 votes
3 answers
686 views

Read large JSON file and return a subset for map

To some extent, this is a wide question, because I do not know in which direction I should move. I am using Polymaps to show markers on a map. The markers are static but the visualization depends on ...
Whir's user avatar
  • 141
2 votes
1 answer
3k views

How to parse a dynamically changing Json file? (c#)

So I know a little bit about parsing Json data but not too much so pardon if I am not describing everything as I should. Lets use this Json file as an example: { "firstname": "John", "...
EmperiumIce's user avatar
12 votes
5 answers
31k views

Is it a bad idea to pass JSON objects on the query string for an API "search" operation?

I'm building an API endpoint for a UI grid to search, filter, and display a list of domain objects, let's call them "widgets." In the past, I would have built this with a list of named query string ...
AJ Johnson's user avatar
2 votes
3 answers
2k views

How to maintain XML/JSON serialization tests?

It is quite common to test JSON / XML producing methods against file-stored expected output (at least in Java world, but probably in other environments, too). For instance there's a method that ...
Dariusz Mydlarz's user avatar
0 votes
1 answer
245 views

API Request/Response Model for showing differences in JSON objects

I am writing an API to merge two different JSON Objects. Both of these objects can have same as well different number of properties. Object 1 : { "name": "Sam", "lastName": "Hanks", "...
Code-47's user avatar
  • 101

1
2 3 4 5
8