json icon indicating copy to clipboard operation
json copied to clipboard

Add migration guide

Open nlohmann opened this issue 3 years ago • 5 comments

The migration guide collects all steps required to make the code future-proof for upcoming releases.

nlohmann avatar Aug 14 '22 11:08 nlohmann

Coverage Status

Coverage remained the same at 100.0% when pulling ac6adbf52a897a7948234669337809b8dad76d42 on migration_guide into 8fcdbf2e771f481d988cb36847d6af6b17e30a99 on develop.

coveralls avatar Aug 14 '22 12:08 coveralls

What do you think of a preprocessor symbol like JSON_PEDANTIC or JSON_FUTURE_PROOF that removes (or adds #error directives to) all deprecated functions or discouraged behavior like implicit conversions? This could be a mode that people could use to have a rough idea whether their code would be still usable in a future version?

nlohmann avatar Aug 17 '22 20:08 nlohmann

That sounds like a good idea. Maybe a JSON_REMOVE_DEPRECATED_FUNCTIONS for the functions, and then a single define that sets all of the macros that remove deprecated behaviors, such as implicit conversions and the compare behavior.

gregmarr avatar Aug 17 '22 20:08 gregmarr

Similar to this: https://github.com/getsentry/responses#deprecations-and-migration-path

nlohmann avatar Aug 19 '22 05:08 nlohmann

That sounds like a good idea. Maybe a JSON_REMOVE_DEPRECATED_FUNCTIONS for the functions, and then a single define that sets all of the macros that remove deprecated behaviors, such as implicit conversions and the compare behavior.

I will not do this in this PR.

nlohmann avatar Aug 20 '22 12:08 nlohmann