Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ONLY_SERIALIZE for NLOHMANN_DEFINE_DERIVED_TYPE_* macros #4562

Merged
merged 7 commits into from
Dec 20, 2024

Conversation

EinarsNG
Copy link
Contributor

@EinarsNG EinarsNG commented Dec 19, 2024

Added additional macros to expand on the #4033 pull request.
2 new macros:

  • NLOHMANN_DEFINE_DERIVED_TYPE_INTRUSIVE_ONLY_SERIALIZE
  • NLOHMANN_DEFINE_DERIVED_TYPE_NON_INTRUSIVE_ONLY_SERIALIZE

Works identically to the ones added in the pull request mentioned above except only allows serialization.


Pull request checklist

Read the Contribution Guidelines for detailed information.

  • Changes are described in the pull request, or an existing issue is referenced.
  • The test suite compiles and runs without error.
  • Code coverage is 100%. Test cases can be added by editing the test suite.
  • The source code is amalgamated; that is, after making changes to the sources in the include/nlohmann directory, run make amalgamate to create the single-header files single_include/nlohmann/json.hpp and single_include/nlohmann/json_fwd.hpp. The whole process is described here.

@coveralls
Copy link

coveralls commented Dec 20, 2024

Coverage Status

coverage: 99.639%. remained the same
when pulling 931f466 on EinarsNG:develop
into 58f5f25 on nlohmann:develop.

@EinarsNG EinarsNG requested a review from nlohmann December 20, 2024 08:03
Copy link
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.11.4 milestone Dec 20, 2024
@nlohmann
Copy link
Owner

Thanks a lot!

@nlohmann nlohmann merged commit af4ad79 into nlohmann:develop Dec 20, 2024
122 checks passed
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.

3 participants