Data.DBXJSONReflect.TJSONUnMarshal

From RAD Studio API Documentation
Jump to: navigation, search

Data.DBXJSONReflect.TMarshalUnmarshalBaseSystem.TObjectTJSONUnMarshal

Delphi

TJSONUnMarshal = class(TMarshalUnmarshalBase)

C++

class PASCALIMPLEMENTATION TJSONUnMarshal : public TMarshalUnmarshalBase

Properties

Type Visibility Source Unit Parent
class public
Data.DBXJSONReflect.pas
Data.DBXJSONReflect.hpp
Data.DBXJSONReflect Data.DBXJSONReflect

Description

Represents the unmarshaling class for JSON objects.

Conversion into a serializable object is called marshaling. The reverse process is called unmarshaling. The unmarshaling process is simpler and uses RTTI to reconstitute the user object.

TJSONUnMarshal reverts the TJSONValue back into a user object. TJSONUnMarshal uses a JSON image created by a TConverter instance to restore the user object. It is assumed that the user object has a constructor with no arguments.

It is assumed that the JSON object was created by an instance of TJSONMarshal and proper reverters are defined with the instance. Unmarshaling of record types is also possible.

Note: TJSONUnMarshal relies on Runtime Type Information (RTTI), so you should know that RTTI is not generated for generic methods. Only instantiated types do have RTTI generated. An instantiated type is the combination of a generic with a set of parameters. Therefore, extra care should be taken when using TJSONUnMarshal and generics.

See Also