Summary

ConverterAttribute can be applied to type or field/property to specify custom converter, which will be used to serialize and de-serialize values.

Syntax

ConverterAttribute = class(TSerlnAttr)

Constructors

 NameDescription
Create 
Top

Properties

 NameDescription
ConverterClass 
Top

Remarks

If ConverterAttribute is applied to type then, the corresponding converter will be used for writing all values of that type; however, this converter can be overridden by specifying ConverterAttribute at the field/property level. For more details, look at  TConverter description.

Examples

DelphiCopyCode imageCopy Code
type

  TMyConverter = class(TConverter)
    //...
  end;

  [Converter(TMyConverter)]
  TMyObject = class
  end;

See Also

Reference