diff options
Diffstat (limited to 'zencore/include')
| -rw-r--r-- | zencore/include/zencore/compactbinary.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/zencore/include/zencore/compactbinary.h b/zencore/include/zencore/compactbinary.h index 66fa3065d..8985144dd 100644 --- a/zencore/include/zencore/compactbinary.h +++ b/zencore/include/zencore/compactbinary.h @@ -870,6 +870,11 @@ private: }; /** + * Serialize a compact binary array to JSON. + */ +ZENCORE_API void CompactBinaryToJson(const CbArrayView& Object, StringBuilderBase& Builder); + +/** * Array of CbField that have no names. * * Accessing a field of the array requires iteration. Access by index is not provided because the @@ -941,6 +946,12 @@ public: /** Returns a view of the array, including the type and name when present. */ using CbFieldView::GetView; + StringBuilderBase& ToJson(StringBuilderBase& Builder) const + { + CompactBinaryToJson(*this, Builder); + return Builder; + } + private: friend inline CbFieldViewIterator begin(const CbArrayView& Array) { return Array.CreateViewIterator(); } friend inline CbFieldViewIterator end(const CbArrayView&) { return CbFieldViewIterator(); } |