aboutsummaryrefslogtreecommitdiff
path: root/zencore/include
diff options
context:
space:
mode:
authorPer Larsson <[email protected]>2022-04-27 21:01:13 +0200
committerGitHub <[email protected]>2022-04-27 21:01:13 +0200
commit38d11ffd48dd61ea3186fc2b27cb1f312206da55 (patch)
tree5df6bf78ff4ead08563863ff67ad8285cc1714b6 /zencore/include
parentBatch log removal of Cid and take proper lock when modifying m_CidMap (#80) (diff)
downloadzen-38d11ffd48dd61ea3186fc2b27cb1f312206da55.tar.xz
zen-38d11ffd48dd61ea3186fc2b27cb1f312206da55.zip
Serialize compact binary from JSON.
Diffstat (limited to 'zencore/include')
-rw-r--r--zencore/include/zencore/compactbinary.h6
-rw-r--r--zencore/include/zencore/string.h2
2 files changed, 7 insertions, 1 deletions
diff --git a/zencore/include/zencore/compactbinary.h b/zencore/include/zencore/compactbinary.h
index 19f1597dc..eba4a1694 100644
--- a/zencore/include/zencore/compactbinary.h
+++ b/zencore/include/zencore/compactbinary.h
@@ -1405,6 +1405,12 @@ ZENCORE_API CbObject LoadCompactBinaryObject(const IoBuffer& Payload);
ZENCORE_API CbObject LoadCompactBinaryObject(CompressedBuffer&& Payload);
ZENCORE_API CbObject LoadCompactBinaryObject(const CompressedBuffer& Payload);
+/**
+ * Load a compact binary from JSON.
+ */
+ZENCORE_API CbFieldIterator LoadCompactBinaryFromJson(std::string_view Json, std::string& Error);
+ZENCORE_API CbFieldIterator LoadCompactBinaryFromJson(std::string_view Json);
+
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
diff --git a/zencore/include/zencore/string.h b/zencore/include/zencore/string.h
index 027730063..012ee73ee 100644
--- a/zencore/include/zencore/string.h
+++ b/zencore/include/zencore/string.h
@@ -999,7 +999,7 @@ public:
static constexpr bool HasOnly(const StringType& Str, AsciiSet Set)
{
auto End = Str.data() + Str.size();
- return FindFirst<EInclude::Members>(Set, GetData(Str), End) == End;
+ return FindFirst<EInclude::Members>(Set, Str.data(), End) == End;
}
private: