ark::serialization::JsonDocumentWriter

Defined in header “ark/serialization/json_writer.hh”.


Creates a new JSON document.

Methods

  • JsonDocumentWriter()
    Constructs a new document.

  • JsonDocumentWriter(const JsonBlob & blob)
    Constructs a new document as a copy of the given blob.

  • ~JsonDocumentWriter()
    Frees any memory associated with this document.

  • JsonObjectWriter root()
    Returns the root object.

  • JsonObjectWriter make_object()
    Returns a newly allocated object, to be set/used as you please.

  • JsonWriteOnlyArray make_array()
    Returns a newly allocated array, to be set/used as you please.

  • std::string str(int32_t indent)
    Returns the document as a string.

  • JsonBlob blob()
    Returns the document as a JSON blob. Makes a copy of the object.