Clarify documentation
This commit is contained in:
parent
961a8e6b39
commit
fdc8e6ea79
@ -7,16 +7,17 @@ json operator "" _json(const char* s, std::size_t n);
|
|||||||
This operator implements a user-defined string literal for JSON objects. It can be used by adding `#!cpp _json` to a
|
This operator implements a user-defined string literal for JSON objects. It can be used by adding `#!cpp _json` to a
|
||||||
string literal and returns a [`json`](json.md) object if no parse error occurred.
|
string literal and returns a [`json`](json.md) object if no parse error occurred.
|
||||||
|
|
||||||
Use any of the following lines to bring the operator into scope:
|
It is recommended to bring the operator into scope using any of the following lines:
|
||||||
```cpp
|
```cpp
|
||||||
|
using nlohmann::literals::operator "" _json;
|
||||||
using namespace nlohmann::literals;
|
using namespace nlohmann::literals;
|
||||||
using namespace nlohmann::json_literals;
|
using namespace nlohmann::json_literals;
|
||||||
using namespace nlohmann::literals::json_literals;
|
using namespace nlohmann::literals::json_literals;
|
||||||
using namespace nlohmann;
|
using namespace nlohmann;
|
||||||
```
|
```
|
||||||
|
This is suggested to ease migration to the next major version release of the library.
|
||||||
|
See ['JSON_USE_GLOBAL_UDLS`](macros/json_use_global_udls.md#notes) for details.
|
||||||
|
|
||||||
Alternatively, define [`JSON_USE_GLOBAL_UDLS`](macros/json_use_global_udls.md) to make them available in the global
|
|
||||||
namespace.
|
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
`s` (in)
|
`s` (in)
|
||||||
|
|||||||
@ -7,16 +7,17 @@ json_pointer operator "" _json_pointer(const char* s, std::size_t n);
|
|||||||
This operator implements a user-defined string literal for JSON Pointers. It can be used by adding `#!cpp _json_pointer`
|
This operator implements a user-defined string literal for JSON Pointers. It can be used by adding `#!cpp _json_pointer`
|
||||||
to a string literal and returns a [`json_pointer`](json_pointer/index.md) object if no parse error occurred.
|
to a string literal and returns a [`json_pointer`](json_pointer/index.md) object if no parse error occurred.
|
||||||
|
|
||||||
Use any of the following lines to bring the operator into scope:
|
It is recommended to bring the operator into scope using any of the following lines:
|
||||||
```cpp
|
```cpp
|
||||||
|
using nlohmann::literals::operator "" _json_pointer;
|
||||||
using namespace nlohmann::literals;
|
using namespace nlohmann::literals;
|
||||||
using namespace nlohmann::json_literals;
|
using namespace nlohmann::json_literals;
|
||||||
using namespace nlohmann::literals::json_literals;
|
using namespace nlohmann::literals::json_literals;
|
||||||
using namespace nlohmann;
|
using namespace nlohmann;
|
||||||
```
|
```
|
||||||
|
This is suggested to ease migration to the next major version release of the library.
|
||||||
|
See ['JSON_USE_GLOBAL_UDLS`](macros/json_use_global_udls.md#notes) for details.
|
||||||
|
|
||||||
Alternatively, define [`JSON_USE_GLOBAL_UDLS`](macros/json_use_global_udls.md) to make them available in the global
|
|
||||||
namespace.
|
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
`s` (in)
|
`s` (in)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user