System.JSON.TJSONString.EstimatedByteSize

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function EstimatedByteSize: Integer; override;

C++

virtual int __fastcall EstimatedByteSize();

Properties

Type Visibility Source Unit Parent
function public
System.JSON.pas
System.JSON.hpp
System.JSON TJSONString

Description

Declares the method that should return the estimated byte size of the current JSON object.

System.JSON.TJSONString.EstimatedByteSize inherits from System.JSON.TJSONAncestor.EstimatedByteSize. All content below this line refers to System.JSON.TJSONAncestor.EstimatedByteSize.

Declares the method that should return the estimated byte size of the current JSON object.

Descendants of TJSONAncestor implementing EstimatedByteSize, for example TJSONString, define EstimatedByteSize as returning the estimated byte size of the current JSON object. This information can be used to estimate the minimum size of the byte container (array of bytes) in which the JSON object can be serialized using the ToBytes method.

Note: The actual byte size of the current JSON object is usually smaller than estimated by EstimatedByteSize.

See Also