aboutsummaryrefslogtreecommitdiff
path: root/libbutl/json/serializer.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2022-03-02 16:27:48 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2022-03-02 16:29:07 +0200
commit8e2422a0022f5bd8e7d1fe8d1ca7b259451869ea (patch)
treec38883281d99ba6a91085208fd37b4a8f535a63c /libbutl/json/serializer.hxx
parent152ea943395822f55591eadaf8e0f5aac263db5e (diff)
Add ability to serialize pre-serialized JSON valuejson-raw
Diffstat (limited to 'libbutl/json/serializer.hxx')
-rw-r--r--libbutl/json/serializer.hxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/libbutl/json/serializer.hxx b/libbutl/json/serializer.hxx
index fad91e2..b52bf65 100644
--- a/libbutl/json/serializer.hxx
+++ b/libbutl/json/serializer.hxx
@@ -235,6 +235,18 @@ namespace butl
void
value (std::nullptr_t);
+ // Serialize value as a pre-serialized JSON value.
+ //
+ // Note that the value is expected to be a valid (and suitable) UTF-8-
+ // encoded JSON text. Note also that if pretty-printing is enabled,
+ // the resulting output may not be correctly indented.
+ //
+ void
+ value_json_text (const char*);
+
+ void
+ value_json_text (const std::string&);
+
// Serialize next JSON event.
//
// If check is false, then don't check whether the value is valid UTF-8