JSON for Modern C++ 3.7.3

back
basic_json
empty
json_pointer
operator std::string
operator!=
operator/
operator/
operator/
operator/=
operator/=
operator/=
operator==
parent_pointer
pop_back
push_back
push_back
to_string
| ## ◆ operator/ [1/3] template<typename BasicJsonType >
json_pointer operator/ | ( | const json_pointer< BasicJsonType > & | lhs,
|  | const json_pointer< BasicJsonType > & | rhs
| ) |  |
| friend
  Parameters
  [in] | lhs | JSON pointer
  [in] | rhs | JSON pointer
  Returns a new JSON pointer with rhs appended to lhs Example The example shows the usage of `operator/`. 1 #include <iostream> 2 #include <nlohmann/json.hpp> 3 4 using json = nlohmann::json; 5 6 int main() 7 { 8 // create a JSON pointer 9 json::json_pointer ptr("/foo"); 10 11 // append a JSON Pointer 12 std::cout << ptr / json::json_pointer("/bar/baz") << '\n'; 13 14 // append a string 15 std::cout << ptr / "fob" << '\n'; 16 17 // append an array index 18 std::cout << ptr / 42 << std::endl; 19 } Output (play with this example online):
      "/foo/bar/baz"
      "/foo/fob"
      "/foo/42"
  The example code above can be translated with
      g++ -std=c++11 -Isingle_include doc/examples/json_pointer__operator_add_binary.cpp -o json_pointer__operator_add_binary
Complexity Linear in the length of lhs and rhs. See also operator/=(const json_pointer&) to append a JSON pointer Since version 3.6.0 Definition at line 11205 of file json.hpp.

nlohmann::basic_json::json_pointer
::nlohmann::json_pointer< basic_json > json_pointer
JSON Pointer, see nlohmann::json_pointer.
Definition: json.hpp:16018
nlohmann::json
basic_json<> json
default JSON class
Definition: json.hpp:2774