Skip to content

Add ADR-009 JSON-Suport#60

Open
Ozaq wants to merge 1 commit into
mainfrom
adr/json-support
Open

Add ADR-009 JSON-Suport#60
Ozaq wants to merge 1 commit into
mainfrom
adr/json-support

Conversation

@Ozaq
Copy link
Copy Markdown
Member

@Ozaq Ozaq commented May 4, 2026

Description

Contributor Declaration

By opening this pull request, I affirm the following:

  • All authors agree to the Contributor License Agreement.
  • The code follows the project's coding standards.
  • I have performed self-review and added comments where needed.
  • I have added or updated tests to verify that my changes are effective and functional.
  • I have run all existing tests and confirmed they pass.

Copy link
Copy Markdown
Member

@pmaciel pmaciel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent study and conclusions. The core advantage is supporting JSON Schema, which will allow a much improved multi-package exchange of information.

I would not weigh the necessity of validating YAML as necessary because at this level the JSON information interchange is certinly adequate, and I see removing YAML at the low level of the stack a good direction (hence I would have finally chosen differently). But this requires a wider agreement and coordination that we're maybe to late to enforce.

The choice is a solid one -- thanks for the hard work!!

@Ozaq
Copy link
Copy Markdown
Member Author

Ozaq commented May 4, 2026

Excellent study and conclusions. The core advantage is supporting JSON Schema, which will allow a much improved multi-package exchange of information.

I would not weigh the necessity of validating YAML as necessary because at this level the JSON information interchange is certinly adequate, and I see removing YAML at the low level of the stack a good direction (hence I would have finally chosen differently). But this requires a wider agreement and coordination that we're maybe to late to enforce.

The choice is a solid one -- thanks for the hard work!!

We are fully entrenched in YAML, there is so much YAML config. It would a large improvement if we would document the desired YAML structure. Right now we have to pry this knowledge from the code.

@pgeier
Copy link
Copy Markdown
Contributor

pgeier commented May 4, 2026

The fact that valijsons adapter architecture allows replacing/adapting any parsing, schema and regex libraries, is a big plus.
JSON, JSON Schema and REGEX is all well defined - the library binds them together. By using a YAML parser we should be able to directly proper error messages - which is a benefit over doing a JSON -> YAML conversion first?
The std::regex is not known to be very performant.

@Ozaq Ozaq requested a review from mcocdawc May 5, 2026 08:52
Copy link
Copy Markdown
Contributor

@simondsmart simondsmart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks well thought through. I would be happy to accept this.

would be


##### simdjson

Read-only support. Designed for high-speed parsing. When searching for JSON libraries for C++ *simdjson* will show up but it does not fit our use case.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does it not fit our use case?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we also want to be able to write json.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely 👍

Copy link
Copy Markdown

@marcosbento marcosbento left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The proposed choice seems to be the most adequate for our purpose.

ecFlow already uses nlohman-json (with the headers embedded into the repo). Once this is accepted, we will gladly adopt it.

Copy link
Copy Markdown
Contributor

@mcocdawc mcocdawc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks very good. My question is only about the proposed example usage.

Comment thread ADR/ADR-009-JSON-Support.md
@Ozaq Ozaq force-pushed the adr/json-support branch from b224824 to 93474b9 Compare May 7, 2026 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants