UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FJsonStructDeserializerBackend Class Reference

#include <JsonStructDeserializerBackend.h>

+ Inheritance diagram for FJsonStructDeserializerBackend:

Public Member Functions

 FJsonStructDeserializerBackend (FArchive &Archive)
 
virtual SERIALIZATION_API const FString & GetCurrentPropertyName () const override
 
virtual SERIALIZATION_API FString GetDebugString () const override
 
virtual SERIALIZATION_API const FString & GetLastErrorMessage () const override
 
virtual SERIALIZATION_API bool GetNextToken (EStructDeserializerBackendTokens &OutToken) override
 
virtual SERIALIZATION_API bool ReadProperty (FProperty *Property, FProperty *Outer, void *Data, int32 ArrayIndex) override
 
virtual SERIALIZATION_API void SkipArray () override
 
virtual SERIALIZATION_API void SkipStructure () override
 
- Public Member Functions inherited from IStructDeserializerBackend
virtual bool ReadPODArray (FArrayProperty *ArrayProperty, void *Data)
 
virtual ~IStructDeserializerBackend ()
 

Protected Member Functions

FString & GetLastIdentifier ()
 
EJsonNotation GetLastNotation ()
 
TSharedRef< TJsonReader< WIDECHAR > > & GetReader ()
 

Detailed Description

Implements a reader for UStruct deserialization using Json.

Note: The underlying Json de-serializer is currently hard-coded to use UCS2CHAR. This is because the current JsonReader 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.

Constructor & Destructor Documentation

◆ FJsonStructDeserializerBackend()

FJsonStructDeserializerBackend::FJsonStructDeserializerBackend ( FArchive Archive)
inline

Creates and initializes a new instance.

Parameters
ArchiveThe archive to deserialize from.

Member Function Documentation

◆ GetCurrentPropertyName()

const FString & FJsonStructDeserializerBackend::GetCurrentPropertyName ( ) const
overridevirtual

Gets the identifier of the current field.

Returns
The field's name.

Implements IStructDeserializerBackend.

◆ GetDebugString()

FString FJsonStructDeserializerBackend::GetDebugString ( ) const
overridevirtual

Gets a debug string for the reader's current state.

The returned string contains debug information that is relevant to the reader's serialization format. For example, it could be a line and column number for text based formats, or a byte offset for binary serialization formats.

Returns
The debug string.

Implements IStructDeserializerBackend.

◆ GetLastErrorMessage()

const FString & FJsonStructDeserializerBackend::GetLastErrorMessage ( ) const
overridevirtual

Gets the last error message.

Returns
Error message.

Implements IStructDeserializerBackend.

◆ GetLastIdentifier()

FString & FJsonStructDeserializerBackend::GetLastIdentifier ( )
inlineprotected

◆ GetLastNotation()

EJsonNotation FJsonStructDeserializerBackend::GetLastNotation ( )
inlineprotected

◆ GetNextToken()

bool FJsonStructDeserializerBackend::GetNextToken ( EStructDeserializerBackendTokens OutToken)
overridevirtual

Reads the next token from the stream.

Parameters
OutTokenWill contain the read token, if any.
Returns
true if a token was read, false otherwise.

Implements IStructDeserializerBackend.

◆ GetReader()

TSharedRef< TJsonReader< WIDECHAR > > & FJsonStructDeserializerBackend::GetReader ( )
inlineprotected

◆ ReadProperty()

bool FJsonStructDeserializerBackend::ReadProperty ( FProperty Property,
FProperty Outer,
void Data,
int32  ArrayIndex 
)
overridevirtual

Reads the specified property from the stream.

Parameters
PropertyThe property to read into.
OuterThe outer property holding the property to read (in case of arrays).
DataThe buffer that will hold the read data.
ArrayIndexAn index into the property array (for static arrays).
Returns
true on success, false otherwise.

Implements IStructDeserializerBackend.

Reimplemented in FNativeJSStructDeserializerBackend.

◆ SkipArray()

void FJsonStructDeserializerBackend::SkipArray ( )
overridevirtual

Skips the array that is currently being read from the stream.

Implements IStructDeserializerBackend.

◆ SkipStructure()

void FJsonStructDeserializerBackend::SkipStructure ( )
overridevirtual

Skips the object that is currently being read from the stream.

Implements IStructDeserializerBackend.


The documentation for this class was generated from the following files: