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
+4 -4
View File
@@ -44,7 +44,7 @@ class (either explicitly or via the conversion operators).
#include <iostream>
#include <nlohmann/json.hpp>
using json = nlohmann::json;
using nlohmann::json;
namespace ns
{
@@ -76,7 +76,7 @@ class (either explicitly or via the conversion operators).
auto p = j.get<ns::person>();
std::cout << p.name << " (" << p.age << ") lives in " << p.address << std::endl;
std::cout << p.name << " (" << p.age << ") lives in " << p.address << '\n';
}
```
@@ -97,7 +97,7 @@ class (either explicitly or via the conversion operators).
#include <iostream>
#include <nlohmann/json.hpp>
using json = nlohmann::json;
using nlohmann::json;
namespace ns
{
@@ -145,7 +145,7 @@ class (either explicitly or via the conversion operators).
auto p = j.get<ns::person>();
std::cout << p.name << " (" << p.age << ") lives in " << p.address << std::endl;
std::cout << p.name << " (" << p.age << ") lives in " << p.address << '\n';
}
```
File diff suppressed because one or more lines are too long
+4 -4
View File
@@ -40,7 +40,7 @@ The example below shows how a `from_json` function can be implemented for a user
#include <iostream>
#include <nlohmann/json.hpp>
using json = nlohmann::json;
using nlohmann::json;
namespace ns
{
@@ -72,7 +72,7 @@ int main()
auto p = j.get<ns::person>();
std::cout << p.name << " (" << p.age << ") lives in " << p.address << std::endl;
std::cout << p.name << " (" << p.age << ") lives in " << p.address << '\n';
}
```
@@ -90,7 +90,7 @@ The example below shows how a `from_json` is implemented as part of a specializa
#include <iostream>
#include <nlohmann/json.hpp>
using json = nlohmann::json;
using nlohmann::json;
namespace ns
{
@@ -138,7 +138,7 @@ int main()
auto p = j.get<ns::person>();
std::cout << p.name << " (" << p.age << ") lives in " << p.address << std::endl;
std::cout << p.name << " (" << p.age << ") lives in " << p.address << '\n';
}
```
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -28,7 +28,7 @@ This function is usually called by the constructors of the [basic_json](../basic
#include <iostream>
#include <nlohmann/json.hpp>
using json = nlohmann::json;
using nlohmann::json;
namespace ns
{
@@ -55,7 +55,7 @@ This function is usually called by the constructors of the [basic_json](../basic
json j = p;
std::cout << j << std::endl;
std::cout << j << '\n';
}
```
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -25,7 +25,7 @@ The example below shows how a `to_json` function can be implemented for a user-d
#include <iostream>
#include <nlohmann/json.hpp>
using json = nlohmann::json;
using nlohmann::json;
namespace ns
{
@@ -52,7 +52,7 @@ int main()
json j = p;
std::cout << j << std::endl;
std::cout << j << '\n';
}
```