1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-16 18:41:53 +03:00

Adjust JSON Pointer examples (#3622)

* 📝 adjust JSON Pointer examples

* 👷 add test for documentation

* 📝 note platform-dependent output on some examples
This commit is contained in:
Niels Lohmann
2022-07-29 14:28:37 +02:00
committed by GitHub
parent 6576c3f776
commit d1d79b930d
18 changed files with 86 additions and 56 deletions

View File

@ -19,16 +19,16 @@ int main()
json::json_pointer ptr11("/ ");
json::json_pointer ptr12("/m~0n");
std::cout << ptr1.to_string() << '\n'
<< ptr2.to_string() << '\n'
<< ptr3.to_string() << '\n'
<< ptr4.to_string() << '\n'
<< ptr5.to_string() << '\n'
<< ptr6.to_string() << '\n'
<< ptr7.to_string() << '\n'
<< ptr8.to_string() << '\n'
<< ptr9.to_string() << '\n'
<< ptr10.to_string() << '\n'
<< ptr11.to_string() << '\n'
<< ptr12.to_string() << std::endl;
std::cout << "\"" << ptr1.to_string() << "\"\n"
<< "\"" << ptr2.to_string() << "\"\n"
<< "\"" << ptr3.to_string() << "\"\n"
<< "\"" << ptr4.to_string() << "\"\n"
<< "\"" << ptr5.to_string() << "\"\n"
<< "\"" << ptr6.to_string() << "\"\n"
<< "\"" << ptr7.to_string() << "\"\n"
<< "\"" << ptr8.to_string() << "\"\n"
<< "\"" << ptr9.to_string() << "\"\n"
<< "\"" << ptr10.to_string() << "\"\n"
<< "\"" << ptr11.to_string() << "\"\n"
<< "\"" << ptr12.to_string() << "\"" << std::endl;
}