Unit 'Json2Yaml' Package
[Overview][Classes][Index] [#fcl]

TJSONToYaml

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Class for converting JSON data to YAML format

Declaration

Source position: json2yaml.pp line 34

type TJSONToYaml = class

public

  procedure Convert();

  

Convert JSON data to YAML format

  property AddHeader: Boolean; [rw]

  

Controls whether to add YAML document header

  property IndentSize: Integer; [rw]

  

Number of spaces used for indentation

end;

Inheritance

TJSONToYaml

  

Class for converting JSON data to YAML format

|

TObject

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

Convert

  

Convert JSON data to YAML format

AddHeader

  

Controls whether to add YAML document header

IndentSize

  

Number of spaces used for indentation


Documentation generated on: Mar 09 2026