Add CI step to build using nlohmann::json
What
This MR adds a copy of the build_and_test
CI step, but configures the YARR compilation with the flag USE_JSON=on
in order
to use nlohmann::json
instead of variant
.
We should enforce that variant
maintains the same API as nlohmann::json
-- because afterall, we do call variant
json
and we are proposing to be compatible with both. However, incompatibilities between the two can be hidden if we only ever compile against variant
, whose public interface is most of the time a subset of nlohmann::json
. For example, there is no at()
or an items()
method for variant
(which uses a very old version of nlohmann::json
).
The reason why this is good to do: nlohmann::json
is more or less the de facto standard for JSON for C++ and if we are going to store our configurations on disk as JSON then we should be compatible with nlohmann
. This makes using YARR alongside other libraries much, much easier.