diff --git a/docs/I_Serializer.md b/docs/I_Serializer.md index be01048..80f0ed5 100644 --- a/docs/I_Serializer.md +++ b/docs/I_Serializer.md @@ -2,16 +2,16 @@ ## Definition -| | | -| ----------- | ----------------- | -| Namespace | mobject-seralizer | -| Library | mobject-seralizer | -| Inheritance | I_Disposable | -| Implements | | +| | | +| ----------- | ------------------------------------------------------------ | +| Namespace | mobject-seralizer | +| Library | mobject-seralizer | +| Inheritance | [I_Disposable](http://disposable.mobject.org/#/I_Disposable) | +| Implements | | ## Remarks -The `I_Serializer` interface is designed to facilitate the serialization of various data types in a structured manner. It extends the `I_Disposable` interface, indicating that instances of `I_Serializer` should be disposed of properly to release resources. The interface provides a wide range of methods to add data of different types to the serialization stream, including primitive types, arrays, and complex objects implementing the `I_Serializable` interface. Additionally, it offers functionality to manage the serialization state, such as starting and ending objects and arrays, and methods to retrieve or reset the serialized data. +The `I_Serializer` interface is designed to facilitate the serialization of various data types in a structured manner. It extends the [I_Disposable](http://disposable.mobject.org/#/I_Disposable) interface, indicating that instances of `I_Serializer` should be disposed of properly to release resources. The interface provides a wide range of methods to add data of different types to the serialization stream, including primitive types, arrays, and complex objects implementing the `I_Serializable` interface. Additionally, it offers functionality to manage the serialization state, such as starting and ending objects and arrays, and methods to retrieve or reset the serialized data. ## Methods @@ -61,10 +61,13 @@ The following example demonstrates how to use the `I_Serializer` interface to se ```plaintext VAR mySerializer: I_Serializer; + myString : T_MAXSTRING; + result : BOOL; END_VAR mySerializer.StartObject(); mySerializer.AddKeyString('Name', 'Example Object'); mySerializer.AddKeyDint('ID', 12345); mySerializer.EndObject(); +result := mySerializer.TryGetSerializedData(ADR(myString), SIZEOF(myString)); // result = TRUE, myString = '{"Name":"Example Object","ID":12345}' ``` diff --git a/mobject-serialization.library b/mobject-serialization.library index 7c8909c..edb19a2 100644 Binary files a/mobject-serialization.library and b/mobject-serialization.library differ diff --git a/src/mobject-serialization/mobject-serialization/mobject-serialization/Interfaces/I_Serializer.TcIO b/src/mobject-serialization/mobject-serialization/mobject-serialization/Interfaces/I_Serializer.TcIO index 08f052d..44d770a 100644 --- a/src/mobject-serialization/mobject-serialization/mobject-serialization/Interfaces/I_Serializer.TcIO +++ b/src/mobject-serialization/mobject-serialization/mobject-serialization/Interfaces/I_Serializer.TcIO @@ -375,8 +375,8 @@ END_VAR]]> VAR_INPUT END_VAR]]> - - +