![]() |
TSDuck v3.43-4441
MPEG Transport Stream Toolkit
|
Conversion between JSON and YAML (experimental). More...
#include <tsjsonYAML.h>
Public Types | |
enum class | StringType { KEY , SCALAR , MULTI_LINE , QUOTED } |
String type, according to YAML usage. More... | |
Static Public Member Functions | |
static StringType | GetStringType (const UString &str) |
Determine the type of a string. | |
static void | PrintAsYAML (TextFormatter &out, const json::Value &value, bool with_headers=false) |
Format a JSON value as YAML text. | |
static void | PrintLiteralBlock (TextFormatter &out, const UString &str) |
Format a string as a literal block scalar. | |
static UString | QuotedString (const UString &str) |
Build a quoted string for YAML. | |
Conversion between JSON and YAML (experimental).
|
strong |
|
static |
|
static |
Determine the type of a string.
[in] | str | The string to check. |
Warning: if the returned type is MULTI_LINE, be sure to check if the string ends with a new line (use "|") or without (use "|-").
|
static |
Format a string as a literal block scalar.
Do not print the last end of line.
[in,out] | out | The text formatter which is used to output. |
[in] | str | The string to format. |