mirror of
https://github.com/tristanpenman/valijson.git
synced 2024-12-12 10:13:51 +01:00
Use string instead string_view
This commit is contained in:
parent
373576a3d2
commit
d52d2dd053
@ -1,5 +1,5 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <string_view>
|
#include <string>
|
||||||
|
|
||||||
#define PICOJSON_USE_INT64
|
#define PICOJSON_USE_INT64
|
||||||
#include "picojson.h"
|
#include "picojson.h"
|
||||||
@ -37,7 +37,7 @@ constexpr auto invalidStrs = R"JSON([
|
|||||||
["2023-07-18T14:46:22Z", "2023-07-18T14:46:22Z", "2023-07-18T14:46:22Z", "2023-07-18T14:46:22Z"]
|
["2023-07-18T14:46:22Z", "2023-07-18T14:46:22Z", "2023-07-18T14:46:22Z", "2023-07-18T14:46:22Z"]
|
||||||
])JSON";
|
])JSON";
|
||||||
|
|
||||||
picojson::value Parse(std::string_view serialized, picojson::value def)
|
picojson::value Parse(std::string serialized, picojson::value def)
|
||||||
{
|
{
|
||||||
picojson::value v;
|
picojson::value v;
|
||||||
auto first = serialized.data();
|
auto first = serialized.data();
|
||||||
|
Loading…
Reference in New Issue
Block a user