Skip to content

docs: Fix missing newline necessary in docs website#5190

Merged
nlohmann merged 2 commits into
nlohmann:developfrom
mikomikotaishi:patch-1
May 21, 2026
Merged

docs: Fix missing newline necessary in docs website#5190
nlohmann merged 2 commits into
nlohmann:developfrom
mikomikotaishi:patch-1

Conversation

@mikomikotaishi
Copy link
Copy Markdown
Contributor

@mikomikotaishi mikomikotaishi commented May 21, 2026

  • The changes are described in detail, both the what and why.
  • If applicable, an existing issue is referenced.
  • The Code coverage remained at 100%. A test case for every new line of code.
  • If applicable, the documentation is updated.
  • The source code is amalgamated by running make amalgamate.

In my previous PR, #5137, I didn't add a newline at the beginning of the bullet-point lists, which caused the list of exported symbols on the documentation page to not render correctly. This PR adds the needed newlines so that the list renders correctly. This furthermore removes the mention of exporting symbols from std, as this is not actually necessary to access these specialisations (and was removed in a previous PR, #5164).

Signed-off-by: Miko <110693261+mikomikotaishi@users.noreply.github.com>
@mikomikotaishi mikomikotaishi requested a review from nlohmann as a code owner May 21, 2026 19:13
@mikomikotaishi mikomikotaishi changed the title Fix missing newline necessary in docs website docs: Fix missing newline necessary in docs website May 21, 2026
Signed-off-by: Miko <110693261+mikomikotaishi@users.noreply.github.com>
Copy link
Copy Markdown
Owner

@nlohmann nlohmann left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@nlohmann nlohmann added this to the Release 3.12.1 milestone May 21, 2026
@nlohmann nlohmann merged commit e054d4d into nlohmann:develop May 21, 2026
142 checks passed
@nlohmann
Copy link
Copy Markdown
Owner

Thanks!

@mikomikotaishi mikomikotaishi deleted the patch-1 branch May 21, 2026 20:52
@mikomikotaishi
Copy link
Copy Markdown
Contributor Author

mikomikotaishi commented May 21, 2026

Please be aware that the module is experimental and a full test is outstanding, and the exported symbols are subject to change.

By the way, what else would need to be done before this disclaimer could be removed? What would a full test need to consist of for the module to be no longer experimental? (I'm not in a rush for anything, but I would be interested in providing additional improvements so that it can be stabilised.)

Additionally, is there a reason using json = nlohmann::json; is used throughout the documentation instead of using nlohmann::json; when the latter is more concise and these two do the same thing?

@nlohmann
Copy link
Copy Markdown
Owner

By the way, what else would need to be done before this disclaimer could be removed? What would a full test need to consist of for the module to be no longer experimental? (I'm not in a rush for anything, but I would be interested in providing additional improvements so that it can be stabilised.)

I think the best we could do is to provide some mechanism to execute the test suite against the module. Maybe this is possible with some preprocessor magic.

Then we would see if all features actually work at least for some compilers.

Happy to see PRs!

Additionally, is there a reason using json = nlohmann::json; is used throughout the documentation instead of using nlohmann::json; when the latter is more concise and these two do the same thing?

We have some examples where we use using json = nlohmann::ordered_json and then use the same code later on.

@mikomikotaishi
Copy link
Copy Markdown
Contributor Author

mikomikotaishi commented May 21, 2026

I think the best we could do is to provide some mechanism to execute the test suite against the module. Maybe this is possible with some preprocessor magic.

Many of the tests I see (the CMake building tests in particular) simply check whether a file compiles after including <nlohmann/json.hpp> and constructing a nlohmann::json. The current modules test does the same thing (and that was how it looked when I first found it); would you like if I made the test a bit more comprehensive to test additional features that the library offers?

I'm not too sure what could be done with preprocessor manipulation, or how much more extensive this would be, but at the very least expanding the current test would provide some greater confidence that things work.

We have some examples where we use using json = nlohmann::ordered_json and then use the same code later on.

Ah, I see, thanks.

Though, wouldn't it be clearer to just write using nlohmann::ordered_json; in those places? Then it would be clear in all places when basic_json or ordered_json is being used, considering json is already a library-defined alias for a template specialisation of basic_json.

@nlohmann
Copy link
Copy Markdown
Owner

Maybe the next step should not necessarily be extending the scope of the tests, but rather the scope of the compilers. It would be good to extend https://json.nlohmann.me/community/quality_assurance/ with a list of compilers for which we know the module work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants