NG SerializerPack

Latest Version: 2024.2

Introduction

NG SerializerPack provides the ability to serialize/de-serialize Delphi objects into various storage formats. Any public (not only published!) property can be automatically handled by the engine. This allows to write data applications in a more object oriented and simpler way. NG SerializerPack uses enhanced RTTI features and supports latest features of Delphi/C++Builder runtime (like e.g. Generics).

Common use cases of a serialization engine are:

  • Saving/loading application options / configuration data which are represented by typed objects.
  • Sending business objects via net between client and server.
  • Saving/loading CAD-like application documents, since they are usually represented at runtime in a tree-like object model.
  • ect.

Features

  • The ability of handling most of Delphi types. Engine does not favor to classes, any type, starting from primitive types, such as Integer or string, to more complex types, such as records or arrays, can be serialized/de-serialized.
  • Support for serializing class/record fields or properties.
  • Full inheritance support.
  • The ability of adjusting serialization process using provided attributes, such as SerializableAttribute, TransientAttribute, AliasAttribute, ect.
  • The ability of writing custom converters.
  • Support of fill-read mode via FillReadAttribute. This mode allows to de-serialize owned by parent object sub-objects without re-creating them; that is, instead of usual action sequence, which is to create new sub-object instance, read its properties and assign this created instance to parent object’s property, fill-read mode use the following action sequence: read parent object’s property, and use read sub-object value to read its properties. This way parent object’s property can be even read-only.
  • XML-Support via Delphi standard XML access, e.g. IXmlDocument, IXmlNode.
  • XML via third party libraries (OmnyXML and NativeXML).
  • JSON via Delphi standard JSON access, e.g. TJSONValue.
  • JSON via third party libraries (SuperObject).
  • Binary stream via standard Delphi TStream.

General NG features are:

  • Compatible with Delphi and C++ Builder XE2 and better including 64bit! The next Delphi/C++Builder release will be supported almost immediately after public availability.
  • FMX support for Delphi/C++Builder XE4 and higher
  • Supported operating systems: Win 7 or better
  • Full sourcecode of all controls included. Registered versions include NG util to compile packages on target system.
  • Extensive demo projects with sourcecode
  • Free updates via Internet
  • A Site License covers unlimited number of developers in same organization at one location
  • Free technical support via public forum (forum.lmd.de), e-mail, fax or mail;
  • Also available as part of NG Complete or LMD VCL Complete.

New in release 2014

  • XML-support for additional 3rd party library (NativeXML) - now 3 different XML providers are supported.
  • NEW: JSON support. Either via Delphi built in JSON access (e.g. TJSONValue) or 3rd party (SuperObject).
  • NEW: Skipping of unknown members / advanced error handling during de-serialization process is now available.
    1. TDeserializer.SkipValue and TBinaryData.SkipAll methods has been added to allow users skip values while manual de-serialization. Corresponding protected method has been implemented in all supported formats. Skipping data has been optimized for speed in a binary format.
    2. OnMemberNotFound event has been added to TDeserializer class, which is executed when RTTI-based de-serialization process is unable to find de-serializing member.
    3. SkipAllAttribute and SkipMemberAttribute has been introduced. They are designed to be used as type level attributes, and allows to specify, which member names to skip without exception while de-serializing.

See also: NG SerializerPack Guide and NG SerializerPack Reference.

The package contains now 7 extensive demo projects. One of them demonstrates a common use of NG Serialization Pack: Transmitting business objects between client and server applications. An extensive object model is created and usage of many supported attributes and creation of converter classes are demonstrated. One more simpler project demonstrates simplicity of (de-)serializing generic TObject and TObjectList descendants from/to XML files. A web service demo was added which loads and transfers data from the Jamendo music platform directly into defined TAlbum and TTrack classes. All other demos represent adapted versions of the different supported target formats (JSON/XML 3rd party libraries).

Screenshots

XML demo project

JSON demo project

Components

Serializer
NG SerializerPack does not contain any components. You use serializer classes or wrappers in a simple way to save/restore your objects.

Documentation

© LMD Innovative, Germany. All rights reserved. All other trademarks are acknowledged.