Navigation
API > API/Runtime > API/Runtime/Serialization > API/Runtime/Serialization/Backends
Inheritance Hierarchy
- IStructSerializerBackend
- FJsonStructSerializerBackend
References
| Module | Serialization |
| Header | /Engine/Source/Runtime/Serialization/Public/Backends/JsonStructSerializerBackend.h |
| Include | #include "Backends/JsonStructSerializerBackend.h" |
Syntax
class FJsonStructSerializerBackend : public IStructSerializerBackend
Remarks
Implements a writer for UStruct serialization using Json.
Note: The underlying Json serializer is currently hard-coded to use UCS2CHAR and pretty-print. This is because the current JsonWriter API does not allow writers to be substituted since it's all based on templates. At some point we will refactor the low-level Json API to provide more flexibility for serialization.
Constructors
| Type | Name | Description | |
|---|---|---|---|
FJsonStructSerializerBackend
(
FArchive& InArchive |
Use the two-parameter constructor with EStructSerializerBackendFlags::Legacy only if you need backwards compatibility with code compiled prior to 4.22; otherwise use EStructSerializerBackendFlags::Default. | ||
FJsonStructSerializerBackend
(
FArchive& InArchive, |
Creates and initializes a new instance with the given flags. |
Functions
| Type | Name | Description | |
|---|---|---|---|
| TSharedRef< TJsonWriter< UCS2CHAR > > & | GetWriter () |
Allow access to the internal JsonWriter to subclasses. | |
| void | WriteNull
(
const FStructSerializerState& State |
Writes a null value to the serialization output. | |
| void | WritePropertyValue
(
const FStructSerializerState& State, |
Writes a property value to the serialization output. |
Overridden from IStructSerializerBackend
| Type | Name | Description | |
|---|---|---|---|
| void | BeginArray
(
const FStructSerializerState& State |
Signals the beginning of an array. | |
| void | BeginStructure
(
const FStructSerializerState& State |
Signals the beginning of a child structure. | |
| void | EndArray
(
const FStructSerializerState& State |
Signals the end of an array.State.ValueProperty points to the property that holds the array. | |
| void | EndStructure
(
const FStructSerializerState& State |
Signals the end of an object.State.ValueProperty points to the property that holds the struct. | |
| void | WriteComment
(
const FString& Comment |
Writes a comment to the output stream. | |
| void | WriteProperty
(
const FStructSerializerState& State, |
Writes a property to the output stream. |
Deprecated Functions
| Type | Name | Description | |
|---|---|---|---|
FJsonStructSerializerBackend
(
FArchive& InArchive |
Use the two-parameter constructor with EStructSerializerBackendFlags::Legacy only if you need backwards compatibility with code compiled prior to 4.22; otherwise use EStructSerializerBackendFlags::Default. |