blob: 0b4a24bffe273613e2eee77b85622de183613ac2 [file] [log] [blame]
// Copyright 2019 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <string>
#include "cbor/cbor_export.h"
namespace cbor {
class Value;
class CBOR_EXPORT DiagnosticWriter {
// Write converts the given CBOR value to a compact string, following the
// "Diagnostic Notation" format for CBOR
// ( |rough_max_output_bytes|
// provides a loose upper bound on the size of the result and the result may
// be truncated if it exceeds this size.
static std::string Write(const Value& node,
size_t rough_max_output_bytes = 4096);
} // namespace cbor