Skip to main content
Software Engineering

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
1 vote
2 answers
151 views

Proper place to validate JSON in an ASP.NET core app

I am building an ASP.NET Core 10.0 web-app using .NET's MVC model w/ Kestrel to serve it. The app will deploy on an Azure VM. It's a personal project, therefore, I decided to go with Cosmos DB as the ...
0 votes
4 answers
433 views

What is a suitable format for writing large amounts of data within few milliseconds

I have a c++ code that needs to store some data whenever an event is triggered. The data contains about 3000 floating point values. So each of these values needs to be written in a file when the event ...
2 votes
0 answers
138 views

When Should We Separate DTOs from REST API Serialization Classes? [closed]

We know that combining a domain entity, a DTO, and a REST API serialization class into one won't pass code review: @JsonInclude(JsonInclude.Include.NON_NULL) @Data @Builder @Entity @Table(name = "...
sfinja's user avatar
  • 129
2 votes
3 answers
104 views

Planning Dynamic Patient Charts with Version Control and Historical Accuracy - Temporal Versioning or JSON

I'm working on a project for our healthcare clinic's software and could use some guidance. For regulatory and historical purposes, patient charts need to remain as "static" records—...
-1 votes
2 answers
170 views

Rest Endpoint Design

I have 6 endpoints that return 6 json response: /cities/{id} return a json object: { "city": "Orlando", "altitude": 10 } /cities return an array: [{ "city": &...
0 votes
1 answer
150 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....
0 votes
0 answers
300 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 ...
11 votes
5 answers
4k 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 ...
1 vote
1 answer
1k 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 ...
1 vote
1 answer
82 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
CCD
  • 143
2 votes
1 answer
1k 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: '...
0 votes
1 answer
2k 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 ...
0 votes
1 answer
439 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
320 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
1k 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-...

15 30 50 per page
1
2 3 4 5
...
25

AltStyle によって変換されたページ (->オリジナル) /