Icon TWriter

Unit: WebCore

Inherits From TObject

Available In: Client and Server Applications

The TWriter class is a class used by TPersistent-descendant classes to save their published properties to JSON strings. It can be used as a general-purpose JSON writer in your applications.

When a TWriter instance is created, the constructor allows you to specify:
  • The date-time format to use when writing date-time properties.


  • The number of spaces to use per indentation level, if the output is not compressed.


  • Whether to include line feeds in the JSON output, if the output is not compressed.


  • Whether to compress all whitespace in the JSON output. Compressing the whitespace removes any unnecessary whitespace in order to keep the size of the JSON output to a minimum.


Image