|
◆ operator/=() [3/3]
template<typename BasicJsonType >
- Parameters
-
[in] | token | reference token to append |
- Returns
- JSON pointer with token appended without escaping token
- Example
- The example shows the usage of
operator/= .
2 #include <nlohmann/json.hpp>
10 std::cout << ptr << '\n';
14 std::cout << ptr << '\n';
18 std::cout << ptr << '\n';
22 std::cout << ptr << std::endl;
::nlohmann::json_pointer< basic_json > json_pointer JSON Pointer, see nlohmann::json_pointer.
basic_json<> json default JSON class
Output (play with this example online): "/foo"
"/foo/bar/baz"
"/foo/bar/baz/fob"
"/foo/bar/baz/fob/42"
The example code above can be translated withg++ -std=c++11 -Isingle_include doc/examples/json_pointer__operator_add.cpp -o json_pointer__operator_add
- Complexity
- Amortized constant.
- See also
- see operator/=(const json_pointer&) to append a JSON pointer
-
see operator/=(std::size_t) to append an array index
-
see operator/(const json_pointer&, std::size_t) for a binary operator
- Since
- version 3.6.0
Definition at line 12460 of file json.hpp.
|