[#nlohmann-adl_serializer-to_json] = xref:nlohmann.adoc[nlohmann]::xref:nlohmann/adl_serializer.adoc[adl_serializer]::to_json :relfileprefix: ../../ :mrdocs: convert any value type to a JSON value == Synopsis Declared in `<nlohmann/adl_serializer.hpp>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename BasicJsonType, typename TargetType = ValueType> static decltype(::nlohmann::to_json(j, std::forward<TargetType>(val)), void()) to_json( BasicJsonType& j, TargetType&& val) noexcept(noexcept(::nlohmann::to_json(j, std::forward<TargetType>(val)))); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#