diff --git a/README.md b/README.md index 127b8d205..96e7a22e1 100644 --- a/README.md +++ b/README.md @@ -870,7 +870,7 @@ assert(p == p2); To make this work with one of your types, you only need to provide two functions: ```cpp -using nlohmann::json; +using json = nlohmann::json; namespace ns { void to_json(json& j, const person& p) { diff --git a/doc/mkdocs/docs/features/arbitrary_types.md b/doc/mkdocs/docs/features/arbitrary_types.md index 23913bba2..423419130 100644 --- a/doc/mkdocs/docs/features/arbitrary_types.md +++ b/doc/mkdocs/docs/features/arbitrary_types.md @@ -54,7 +54,7 @@ assert(p == p2); To make this work with one of your types, you only need to provide two functions: ```cpp -using nlohmann::json; +using json = nlohmann::json; namespace ns { void to_json(json& j, const person& p) {