IDS peak ICV v1.3.0
Loading...
Searching...
No Matches
Deserializer Class Reference
Inheritance diagram for Deserializer:

Public Member Functions

IArchive Read (Stream stream)
 Reads serialized data from the specified stream and deserializes it into an archive.
 

Detailed Description

Deserializer for reading serialized data and converting it into an IArchive object.

This class provides functionality to read data from a supported serialization format (currently, only JSON) and reconstruct it as an IArchive object. It inherits from peak.common.serialization.IDeserializer and implements the deserialization operations.

using var file = new FileStream("archive.json", FileMode.Open);
var deserializer = new peak::icv.Deserializer();
var archive = deserializer.Read(file);
var id = archive.GetInt64("id");
var name = archive.GetString("name");
Deserializer for reading serialized data and converting it into an IArchive object.
std::shared_ptr< peak::common::serialization::IArchive > Read(std::istream &stream) override
Reads serialized data from the specified stream and deserializes it into an archive.
See also
IDSImaging.Peak.Common.Serialization.IDeserializer, IDSImaging.Peak.Common.Serialization.IArchive, SerializationType
Since
IDSImaging.Peak.ICV 1.3

Definition at line 34 of file Deserializer.cs.

Member Function Documentation

◆ Read()

IArchive Read ( Stream stream)
inline

Reads serialized data from the specified stream and deserializes it into an archive.

Parameters
streamThe stream to read serialized data from.
Returns
An object implementing the IArchive interface containing the deserialized data.
Exceptions
IcvNotSupportedExceptionThe serialization type is not supported.
IcvCorruptedExceptionThe stream contains invalid or corrupted data.
Since
IDSImaging.Peak.ICV 1.3

Implements IDeserializer.

Definition at line 54 of file Deserializer.cs.