mirror of
https://github.com/nlohmann/json.git
synced 2026-10-04 06:11:14 +01:00
deploy: 63c10a51fc
This commit is contained in:
@@ -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';
|
||||
}
|
||||
Reference in New Issue
Block a user