This commit is contained in:
nlohmann
2026-10-03 05:43:12 +00:00
parent 2aaa1d24ef
commit a410b4f40f
741 changed files with 8115 additions and 2252 deletions
+15
View File
@@ -0,0 +1,15 @@
#include <iostream>
#include <vector>
#include <nlohmann/json.hpp>
using json = nlohmann::json;
int main()
{
// a buffer containing a JSON text followed by more data
std::vector<std::uint8_t> input = {'[', '1', ',', '2', ',', '3', ']', 'o', 't', 'h', 'e', 'r'};
std::cout << std::boolalpha
<< json::accept(input.begin(), input.begin() + 7) << ' '
<< json::accept(input.begin(), input.end()) << '\n';
}