Sign in Join
FPDoc Onlineexperiment

TJSONToYaml class

In unit Json2Yaml

Class for converting JSON data to YAML format

Declaration

pascal
TJSONToYaml = class

Description

TJSONToYaml provides functionality to convert JSON data structures into YAML format. The class can handle all JSON data types including objects, arrays, strings, numbers, booleans, and null values. The conversion preserves the hierarchical structure and produces properly indented YAML output.

The class supports configurable indentation size and can optionally add a YAML document header (---). Conversion is performed by calling the Convert method with the source JSON data and target output stream.

See also

Properties

TheOutputprotected
AddHeaderpublicControls whether to add YAML document header
IndentSizepublicNumber of spaces used for indentation

Methods

Indentprotected
ConvertNullprotected
ConvertBooleanprotected
ConvertArrayprotected
ConvertObjectprotected
ConvertNumberprotected
ConvertStringprotected
DoConvertprotected
Pushprotected
ConvertpublicConvert JSON data to YAML format

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.