Navigation
API > API/Runtime > API/Runtime/Serialization
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.
| Name | FJsonStructSerializerBackend |
| Type | class |
| Header File | /Engine/Source/Runtime/Serialization/Public/Backends/JsonStructSerializerBackend.h |
| Include Path | #include "Backends/JsonStructSerializerBackend.h" |
Syntax
class FJsonStructSerializerBackend : public IStructSerializerBackend
Implements Interfaces
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FJsonStructSerializerBackend
(
FArchive& InArchive |
Creates and initializes a new legacy instance. | Backends/JsonStructSerializerBackend.h | |
FJsonStructSerializerBackend
(
FArchive& InArchive, |
Creates and initializes a new instance with the given flags. | Backends/JsonStructSerializerBackend.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Flags | EStructSerializerBackendFlags | Flags controlling the serialization behavior. | Backends/JsonStructSerializerBackend.h | |
| JsonWriter | TSharedRef< TJsonWriter< UCS2CHAR > > | Holds the Json writer used for the actual serialization. | Backends/JsonStructSerializerBackend.h |
Functions
Public
Overridden from IStructSerializerBackend
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void BeginArray
(
const FStructSerializerState& State |
Signals the beginning of an array. | Backends/JsonStructSerializerBackend.h | |
virtual void BeginStructure
(
const FStructSerializerState& State |
Signals the beginning of a child structure. | Backends/JsonStructSerializerBackend.h | |
virtual void EndArray
(
const FStructSerializerState& State |
Signals the end of an array.State.ValueProperty points to the property that holds the array. | Backends/JsonStructSerializerBackend.h | |
virtual void EndStructure
(
const FStructSerializerState& State |
Signals the end of an object.State.ValueProperty points to the property that holds the struct. | Backends/JsonStructSerializerBackend.h | |
virtual void WriteComment
(
const FString& Comment |
Writes a comment to the output stream. | Backends/JsonStructSerializerBackend.h | |
virtual bool WritePODArray
(
const FStructSerializerState& State |
Writes a POD Array property to the output stream. | Backends/JsonStructSerializerBackend.h | |
virtual void WriteProperty
(
const FStructSerializerState& State, |
Writes a property to the output stream. | Backends/JsonStructSerializerBackend.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TSharedRef< TJsonWriter< UCS2CHAR > > & GetWriter() |
Allow access to the internal JsonWriter to subclasses. | Backends/JsonStructSerializerBackend.h | |
void WriteNull
(
const FStructSerializerState& State |
Writes a null value to the serialization output. | Backends/JsonStructSerializerBackend.h | |
void WritePropertyValue
(
const FStructSerializerState& State, |
Writes a property value to the serialization output. | Backends/JsonStructSerializerBackend.h |