UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TImplementsJsonObjectStructConverter< StructType > Struct Template Reference

#include <JsonObjectStructInterface.h>

+ Inheritance diagram for TImplementsJsonObjectStructConverter< StructType >:

Public Member Functions

 TImplementsJsonObjectStructConverter ()
 
virtual EJsonObjectConvertResult ConvertToJson (const void *StructMemory, TSharedPtr< FJsonObject > &OutJsonObject) const override
 
virtual EJsonObjectConvertResult ConvertFromJson (void *StructMemory, const TSharedPtr< FJsonObject > &InJsonObject) const override
 

Additional Inherited Members

- Protected Member Functions inherited from IJsonObjectStructConverter
virtual ~IJsonObjectStructConverter ()=default
 

Detailed Description

template<typename StructType>
struct TImplementsJsonObjectStructConverter< StructType >

This template is to be statically constructed and passed as a parameter to RegisterStructConverter in StartupModule() for the specified StructType. Remember to explicitly call UnregisterStructConverter in ShutdownModule() as well.

Example usage:

void FExampleModule::StartupModule() { static const TImplementsJsonObjectStructConverter<FExampleStruct> ExampleConverter = TImplementsJsonObjectStructConverter<FExampleStruct>(); FJsonObjectStructInterfaceRegistry::RegisterStructConverter(FExampleStruct::StaticStruct(), &ExampleConverter); }

void FExampleModule::ShutdownModule() { FJsonObjectStructInterfaceRegistry::UnregisterStructConverter(FExampleStruct::StaticStruct()); }

Constructor & Destructor Documentation

◆ TImplementsJsonObjectStructConverter()

Member Function Documentation

◆ ConvertFromJson()

template<typename StructType >
virtual EJsonObjectConvertResult TImplementsJsonObjectStructConverter< StructType >::ConvertFromJson ( void StructMemory,
const TSharedPtr< FJsonObject > &  InJsonObject 
) const
inlineoverridevirtual

Result of Converted represents success by the interface call, FailAndAbort will bubble up the failure to its owner converter failing the entire converter tree, IgnoreAndContinue should leave the struct untouched/default and the converter tree can still succeed, and UseDefaultConverter will try to fallback to the non-static-interface behavior instead.

Implements IJsonObjectStructConverter.

◆ ConvertToJson()

template<typename StructType >
virtual EJsonObjectConvertResult TImplementsJsonObjectStructConverter< StructType >::ConvertToJson ( const void StructMemory,
TSharedPtr< FJsonObject > &  OutJsonObject 
) const
inlineoverridevirtual

Result of Converted represents success by the interface call, FailAndAbort will bubble up the failure to its owner converter which may fail the entire converter tree, IgnoreAndContinue will make an empty FJsonObject for this struct and the converter tree can still succeed, and UseDefaultConverter will try to fallback to the non-static-interface behavior instead.

Implements IJsonObjectStructConverter.


The documentation for this struct was generated from the following file: