This commit is contained in:
nlohmann
2026-10-26 21:24:35 +00:00
parent 41c601a7d1
commit d2e264bd84
1400 changed files with 11859 additions and 5440 deletions
+2 -2
View File
@@ -31,7 +31,7 @@ It is safe to move the passed binary value.
#include <sstream>
#include <nlohmann/json.hpp>
using json = nlohmann::json;
using nlohmann::json;
// a simple event consumer that collects string representations of the passed
// values; note inheriting from json::json_sax_t is not required, but can
@@ -138,7 +138,7 @@ It is safe to move the passed binary value.
}
// output the result of sax_parse
std::cout << "\nresult: " << std::boolalpha << result << std::endl;
std::cout << "\nresult: " << std::boolalpha << result << '\n';
}
```
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -30,7 +30,7 @@ The example below shows how the SAX interface is used.
#include <sstream>
#include <nlohmann/json.hpp>
using json = nlohmann::json;
using nlohmann::json;
// a simple event consumer that collects string representations of the passed
// values; note inheriting from json::json_sax_t is not required, but can
@@ -137,7 +137,7 @@ int main()
}
// output the result of sax_parse
std::cout << "\nresult: " << std::boolalpha << result << std::endl;
std::cout << "\nresult: " << std::boolalpha << result << '\n';
}
```
+3 -3
View File
@@ -27,7 +27,7 @@ Whether parsing should proceed.
#include <sstream>
#include <nlohmann/json.hpp>
using json = nlohmann::json;
using nlohmann::json;
// a simple event consumer that collects string representations of the passed
// values; note inheriting from json::json_sax_t is not required, but can
@@ -119,7 +119,7 @@ Whether parsing should proceed.
int main()
{
// a JSON text
auto text = R"(
const auto* text = R"(
{
"Image": {
"Width": 800,
@@ -151,7 +151,7 @@ Whether parsing should proceed.
}
// output the result of sax_parse
std::cout << "\nresult: " << std::boolalpha << result << std::endl;
std::cout << "\nresult: " << std::boolalpha << result << '\n';
}
```
File diff suppressed because one or more lines are too long
+3 -3
View File
@@ -26,7 +26,7 @@ The example below shows how the SAX interface is used.
#include <sstream>
#include <nlohmann/json.hpp>
using json = nlohmann::json;
using nlohmann::json;
// a simple event consumer that collects string representations of the passed
// values; note inheriting from json::json_sax_t is not required, but can
@@ -118,7 +118,7 @@ class sax_event_consumer : public json::json_sax_t
int main()
{
// a JSON text
auto text = R"(
const auto* text = R"(
{
"Image": {
"Width": 800,
@@ -150,7 +150,7 @@ int main()
}
// output the result of sax_parse
std::cout << "\nresult: " << std::boolalpha << result << std::endl;
std::cout << "\nresult: " << std::boolalpha << result << '\n';
}
```
+3 -3
View File
@@ -22,7 +22,7 @@ Whether parsing should proceed.
#include <sstream>
#include <nlohmann/json.hpp>
using json = nlohmann::json;
using nlohmann::json;
// a simple event consumer that collects string representations of the passed
// values; note inheriting from json::json_sax_t is not required, but can
@@ -114,7 +114,7 @@ Whether parsing should proceed.
int main()
{
// a JSON text
auto text = R"(
const auto* text = R"(
{
"Image": {
"Width": 800,
@@ -146,7 +146,7 @@ Whether parsing should proceed.
}
// output the result of sax_parse
std::cout << "\nresult: " << std::boolalpha << result << std::endl;
std::cout << "\nresult: " << std::boolalpha << result << '\n';
}
```
File diff suppressed because one or more lines are too long
+3 -3
View File
@@ -22,7 +22,7 @@ The example below shows how the SAX interface is used.
#include <sstream>
#include <nlohmann/json.hpp>
using json = nlohmann::json;
using nlohmann::json;
// a simple event consumer that collects string representations of the passed
// values; note inheriting from json::json_sax_t is not required, but can
@@ -114,7 +114,7 @@ class sax_event_consumer : public json::json_sax_t
int main()
{
// a JSON text
auto text = R"(
const auto* text = R"(
{
"Image": {
"Width": 800,
@@ -146,7 +146,7 @@ int main()
}
// output the result of sax_parse
std::cout << "\nresult: " << std::boolalpha << result << std::endl;
std::cout << "\nresult: " << std::boolalpha << result << '\n';
}
```
+3 -3
View File
@@ -22,7 +22,7 @@ Whether parsing should proceed.
#include <sstream>
#include <nlohmann/json.hpp>
using json = nlohmann::json;
using nlohmann::json;
// a simple event consumer that collects string representations of the passed
// values; note inheriting from json::json_sax_t is not required, but can
@@ -114,7 +114,7 @@ Whether parsing should proceed.
int main()
{
// a JSON text
auto text = R"(
const auto* text = R"(
{
"Image": {
"Width": 800,
@@ -146,7 +146,7 @@ Whether parsing should proceed.
}
// output the result of sax_parse
std::cout << "\nresult: " << std::boolalpha << result << std::endl;
std::cout << "\nresult: " << std::boolalpha << result << '\n';
}
```
File diff suppressed because one or more lines are too long
+3 -3
View File
@@ -22,7 +22,7 @@ The example below shows how the SAX interface is used.
#include <sstream>
#include <nlohmann/json.hpp>
using json = nlohmann::json;
using nlohmann::json;
// a simple event consumer that collects string representations of the passed
// values; note inheriting from json::json_sax_t is not required, but can
@@ -114,7 +114,7 @@ class sax_event_consumer : public json::json_sax_t
int main()
{
// a JSON text
auto text = R"(
const auto* text = R"(
{
"Image": {
"Width": 800,
@@ -146,7 +146,7 @@ int main()
}
// output the result of sax_parse
std::cout << "\nresult: " << std::boolalpha << result << std::endl;
std::cout << "\nresult: " << std::boolalpha << result << '\n';
}
```
File diff suppressed because one or more lines are too long
+3 -3
View File
@@ -31,7 +31,7 @@ It is safe to move the passed object key value.
#include <sstream>
#include <nlohmann/json.hpp>
using json = nlohmann::json;
using nlohmann::json;
// a simple event consumer that collects string representations of the passed
// values; note inheriting from json::json_sax_t is not required, but can
@@ -123,7 +123,7 @@ It is safe to move the passed object key value.
int main()
{
// a JSON text
auto text = R"(
const auto* text = R"(
{
"Image": {
"Width": 800,
@@ -155,7 +155,7 @@ It is safe to move the passed object key value.
}
// output the result of sax_parse
std::cout << "\nresult: " << std::boolalpha << result << std::endl;
std::cout << "\nresult: " << std::boolalpha << result << '\n';
}
```
File diff suppressed because one or more lines are too long
+3 -3
View File
@@ -30,7 +30,7 @@ The example below shows how the SAX interface is used.
#include <sstream>
#include <nlohmann/json.hpp>
using json = nlohmann::json;
using nlohmann::json;
// a simple event consumer that collects string representations of the passed
// values; note inheriting from json::json_sax_t is not required, but can
@@ -122,7 +122,7 @@ class sax_event_consumer : public json::json_sax_t
int main()
{
// a JSON text
auto text = R"(
const auto* text = R"(
{
"Image": {
"Width": 800,
@@ -154,7 +154,7 @@ int main()
}
// output the result of sax_parse
std::cout << "\nresult: " << std::boolalpha << result << std::endl;
std::cout << "\nresult: " << std::boolalpha << result << '\n';
}
```
+3 -3
View File
@@ -22,7 +22,7 @@ Whether parsing should proceed.
#include <sstream>
#include <nlohmann/json.hpp>
using json = nlohmann::json;
using nlohmann::json;
// a simple event consumer that collects string representations of the passed
// values; note inheriting from json::json_sax_t is not required, but can
@@ -114,7 +114,7 @@ Whether parsing should proceed.
int main()
{
// a JSON text
auto text = R"(
const auto* text = R"(
{
"Image": {
"Width": 800,
@@ -146,7 +146,7 @@ Whether parsing should proceed.
}
// output the result of sax_parse
std::cout << "\nresult: " << std::boolalpha << result << std::endl;
std::cout << "\nresult: " << std::boolalpha << result << '\n';
}
```
File diff suppressed because one or more lines are too long
+3 -3
View File
@@ -22,7 +22,7 @@ The example below shows how the SAX interface is used.
#include <sstream>
#include <nlohmann/json.hpp>
using json = nlohmann::json;
using nlohmann::json;
// a simple event consumer that collects string representations of the passed
// values; note inheriting from json::json_sax_t is not required, but can
@@ -114,7 +114,7 @@ class sax_event_consumer : public json::json_sax_t
int main()
{
// a JSON text
auto text = R"(
const auto* text = R"(
{
"Image": {
"Width": 800,
@@ -146,7 +146,7 @@ int main()
}
// output the result of sax_parse
std::cout << "\nresult: " << std::boolalpha << result << std::endl;
std::cout << "\nresult: " << std::boolalpha << result << '\n';
}
```
+3 -3
View File
@@ -30,7 +30,7 @@ Whether parsing should proceed.
#include <sstream>
#include <nlohmann/json.hpp>
using json = nlohmann::json;
using nlohmann::json;
// a simple event consumer that collects string representations of the passed
// values; note inheriting from json::json_sax_t is not required, but can
@@ -122,7 +122,7 @@ Whether parsing should proceed.
int main()
{
// a JSON text
auto text = R"(
const auto* text = R"(
{
"Image": {
"Width": 800,
@@ -154,7 +154,7 @@ Whether parsing should proceed.
}
// output the result of sax_parse
std::cout << "\nresult: " << std::boolalpha << result << std::endl;
std::cout << "\nresult: " << std::boolalpha << result << '\n';
}
```
File diff suppressed because one or more lines are too long
+3 -3
View File
@@ -28,7 +28,7 @@ The example below shows how the SAX interface is used.
#include <sstream>
#include <nlohmann/json.hpp>
using json = nlohmann::json;
using nlohmann::json;
// a simple event consumer that collects string representations of the passed
// values; note inheriting from json::json_sax_t is not required, but can
@@ -120,7 +120,7 @@ class sax_event_consumer : public json::json_sax_t
int main()
{
// a JSON text
auto text = R"(
const auto* text = R"(
{
"Image": {
"Width": 800,
@@ -152,7 +152,7 @@ int main()
}
// output the result of sax_parse
std::cout << "\nresult: " << std::boolalpha << result << std::endl;
std::cout << "\nresult: " << std::boolalpha << result << '\n';
}
```
+3 -3
View File
@@ -27,7 +27,7 @@ Whether parsing should proceed.
#include <sstream>
#include <nlohmann/json.hpp>
using json = nlohmann::json;
using nlohmann::json;
// a simple event consumer that collects string representations of the passed
// values; note inheriting from json::json_sax_t is not required, but can
@@ -119,7 +119,7 @@ Whether parsing should proceed.
int main()
{
// a JSON text
auto text = R"(
const auto* text = R"(
{
"Image": {
"Width": 800,
@@ -151,7 +151,7 @@ Whether parsing should proceed.
}
// output the result of sax_parse
std::cout << "\nresult: " << std::boolalpha << result << std::endl;
std::cout << "\nresult: " << std::boolalpha << result << '\n';
}
```
File diff suppressed because one or more lines are too long
+3 -3
View File
@@ -26,7 +26,7 @@ The example below shows how the SAX interface is used.
#include <sstream>
#include <nlohmann/json.hpp>
using json = nlohmann::json;
using nlohmann::json;
// a simple event consumer that collects string representations of the passed
// values; note inheriting from json::json_sax_t is not required, but can
@@ -118,7 +118,7 @@ class sax_event_consumer : public json::json_sax_t
int main()
{
// a JSON text
auto text = R"(
const auto* text = R"(
{
"Image": {
"Width": 800,
@@ -150,7 +150,7 @@ int main()
}
// output the result of sax_parse
std::cout << "\nresult: " << std::boolalpha << result << std::endl;
std::cout << "\nresult: " << std::boolalpha << result << '\n';
}
```
+3 -3
View File
@@ -27,7 +27,7 @@ Whether parsing should proceed.
#include <sstream>
#include <nlohmann/json.hpp>
using json = nlohmann::json;
using nlohmann::json;
// a simple event consumer that collects string representations of the passed
// values; note inheriting from json::json_sax_t is not required, but can
@@ -119,7 +119,7 @@ Whether parsing should proceed.
int main()
{
// a JSON text
auto text = R"(
const auto* text = R"(
{
"Image": {
"Width": 800,
@@ -151,7 +151,7 @@ Whether parsing should proceed.
}
// output the result of sax_parse
std::cout << "\nresult: " << std::boolalpha << result << std::endl;
std::cout << "\nresult: " << std::boolalpha << result << '\n';
}
```
File diff suppressed because one or more lines are too long
+3 -3
View File
@@ -26,7 +26,7 @@ The example below shows how the SAX interface is used.
#include <sstream>
#include <nlohmann/json.hpp>
using json = nlohmann::json;
using nlohmann::json;
// a simple event consumer that collects string representations of the passed
// values; note inheriting from json::json_sax_t is not required, but can
@@ -118,7 +118,7 @@ class sax_event_consumer : public json::json_sax_t
int main()
{
// a JSON text
auto text = R"(
const auto* text = R"(
{
"Image": {
"Width": 800,
@@ -150,7 +150,7 @@ int main()
}
// output the result of sax_parse
std::cout << "\nresult: " << std::boolalpha << result << std::endl;
std::cout << "\nresult: " << std::boolalpha << result << '\n';
}
```
+3 -3
View File
@@ -35,7 +35,7 @@ Whether parsing should proceed (**must return `#!cpp false`**).
#include <sstream>
#include <nlohmann/json.hpp>
using json = nlohmann::json;
using nlohmann::json;
// a simple event consumer that collects string representations of the passed
// values; note inheriting from json::json_sax_t is not required, but can
@@ -127,7 +127,7 @@ Whether parsing should proceed (**must return `#!cpp false`**).
int main()
{
// a JSON text
auto text = R"(
const auto* text = R"(
{
"Image": {
"Width": 800,
@@ -159,7 +159,7 @@ Whether parsing should proceed (**must return `#!cpp false`**).
}
// output the result of sax_parse
std::cout << "\nresult: " << std::boolalpha << result << std::endl;
std::cout << "\nresult: " << std::boolalpha << result << '\n';
}
```
File diff suppressed because one or more lines are too long
+3 -3
View File
@@ -32,7 +32,7 @@ The example below shows how the SAX interface is used.
#include <sstream>
#include <nlohmann/json.hpp>
using json = nlohmann::json;
using nlohmann::json;
// a simple event consumer that collects string representations of the passed
// values; note inheriting from json::json_sax_t is not required, but can
@@ -124,7 +124,7 @@ class sax_event_consumer : public json::json_sax_t
int main()
{
// a JSON text
auto text = R"(
const auto* text = R"(
{
"Image": {
"Width": 800,
@@ -156,7 +156,7 @@ int main()
}
// output the result of sax_parse
std::cout << "\nresult: " << std::boolalpha << result << std::endl;
std::cout << "\nresult: " << std::boolalpha << result << '\n';
}
```
+3 -3
View File
@@ -31,7 +31,7 @@ Binary formats may report the number of elements.
#include <sstream>
#include <nlohmann/json.hpp>
using json = nlohmann::json;
using nlohmann::json;
// a simple event consumer that collects string representations of the passed
// values; note inheriting from json::json_sax_t is not required, but can
@@ -123,7 +123,7 @@ Binary formats may report the number of elements.
int main()
{
// a JSON text
auto text = R"(
const auto* text = R"(
{
"Image": {
"Width": 800,
@@ -155,7 +155,7 @@ Binary formats may report the number of elements.
}
// output the result of sax_parse
std::cout << "\nresult: " << std::boolalpha << result << std::endl;
std::cout << "\nresult: " << std::boolalpha << result << '\n';
}
```
File diff suppressed because one or more lines are too long
+3 -3
View File
@@ -30,7 +30,7 @@ The example below shows how the SAX interface is used.
#include <sstream>
#include <nlohmann/json.hpp>
using json = nlohmann::json;
using nlohmann::json;
// a simple event consumer that collects string representations of the passed
// values; note inheriting from json::json_sax_t is not required, but can
@@ -122,7 +122,7 @@ class sax_event_consumer : public json::json_sax_t
int main()
{
// a JSON text
auto text = R"(
const auto* text = R"(
{
"Image": {
"Width": 800,
@@ -154,7 +154,7 @@ int main()
}
// output the result of sax_parse
std::cout << "\nresult: " << std::boolalpha << result << std::endl;
std::cout << "\nresult: " << std::boolalpha << result << '\n';
}
```
+3 -3
View File
@@ -31,7 +31,7 @@ Binary formats may report the number of elements.
#include <sstream>
#include <nlohmann/json.hpp>
using json = nlohmann::json;
using nlohmann::json;
// a simple event consumer that collects string representations of the passed
// values; note inheriting from json::json_sax_t is not required, but can
@@ -123,7 +123,7 @@ Binary formats may report the number of elements.
int main()
{
// a JSON text
auto text = R"(
const auto* text = R"(
{
"Image": {
"Width": 800,
@@ -155,7 +155,7 @@ Binary formats may report the number of elements.
}
// output the result of sax_parse
std::cout << "\nresult: " << std::boolalpha << result << std::endl;
std::cout << "\nresult: " << std::boolalpha << result << '\n';
}
```
File diff suppressed because one or more lines are too long
+3 -3
View File
@@ -30,7 +30,7 @@ The example below shows how the SAX interface is used.
#include <sstream>
#include <nlohmann/json.hpp>
using json = nlohmann::json;
using nlohmann::json;
// a simple event consumer that collects string representations of the passed
// values; note inheriting from json::json_sax_t is not required, but can
@@ -122,7 +122,7 @@ class sax_event_consumer : public json::json_sax_t
int main()
{
// a JSON text
auto text = R"(
const auto* text = R"(
{
"Image": {
"Width": 800,
@@ -154,7 +154,7 @@ int main()
}
// output the result of sax_parse
std::cout << "\nresult: " << std::boolalpha << result << std::endl;
std::cout << "\nresult: " << std::boolalpha << result << '\n';
}
```
+3 -3
View File
@@ -31,7 +31,7 @@ It is safe to move the passed string value.
#include <sstream>
#include <nlohmann/json.hpp>
using json = nlohmann::json;
using nlohmann::json;
// a simple event consumer that collects string representations of the passed
// values; note inheriting from json::json_sax_t is not required, but can
@@ -123,7 +123,7 @@ It is safe to move the passed string value.
int main()
{
// a JSON text
auto text = R"(
const auto* text = R"(
{
"Image": {
"Width": 800,
@@ -155,7 +155,7 @@ It is safe to move the passed string value.
}
// output the result of sax_parse
std::cout << "\nresult: " << std::boolalpha << result << std::endl;
std::cout << "\nresult: " << std::boolalpha << result << '\n';
}
```
File diff suppressed because one or more lines are too long
+3 -3
View File
@@ -30,7 +30,7 @@ The example below shows how the SAX interface is used.
#include <sstream>
#include <nlohmann/json.hpp>
using json = nlohmann::json;
using nlohmann::json;
// a simple event consumer that collects string representations of the passed
// values; note inheriting from json::json_sax_t is not required, but can
@@ -122,7 +122,7 @@ class sax_event_consumer : public json::json_sax_t
int main()
{
// a JSON text
auto text = R"(
const auto* text = R"(
{
"Image": {
"Width": 800,
@@ -154,7 +154,7 @@ int main()
}
// output the result of sax_parse
std::cout << "\nresult: " << std::boolalpha << result << std::endl;
std::cout << "\nresult: " << std::boolalpha << result << '\n';
}
```