System.JSON.Writers.TJsonTextWriter

From RAD Studio API Documentation
Jump to: navigation, search

System.JSON.Writers.TJsonWriterSystem.TObjectTJsonTextWriter

Delphi

TJsonTextWriter = class(TJsonWriter)

C++

class PASCALIMPLEMENTATION TJsonTextWriter : public TJsonWriter

Properties

Type Visibility Source Unit Parent
class public
System.JSON.Writers.pas
System.JSON.Writers.hpp
System.JSON.Writers System.JSON.Writers

Description

Class that represents a writer to serialize JSON data.

TJsonTextWriter is a class, extended from TJsonWriter, to write JSON content. TJsonTextWriter provides error checking for the invalid JSON.

To write JSON data:

  1. Create a JSON writer to write data to the specified text writer.
  2. Call the appropriate writing method sequentially for the JSON token to be generated. For example, call WriteStartObject to write the beginning of a JSON object.

TJsonTextWriter also provides some additional features:

  • Formatting indicates how the JSON text is formatted. When set to Indented, the result is easy-to-read JSON data with indentation.

See Also