![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <JsonObjectStructInterface.h>
Inheritance diagram for IJsonObjectStructConverter:Public Member Functions | |
| virtual EJsonObjectConvertResult | ConvertToJson (const void *StructMemory, TSharedPtr< FJsonObject > &OutJsonObject) const =0 |
| virtual EJsonObjectConvertResult | ConvertFromJson (void *StructMemory, const TSharedPtr< FJsonObject > &InJsonObject) const =0 |
Protected Member Functions | |
| virtual | ~IJsonObjectStructConverter ()=default |
UStructs are special and may need to avoid the use of virtual functions via standard interface patterns due to mismatched base-class polymorphism. So use a static TImplementsJsonObjectStructConverter<StructType> which uses a static-interface pattern with global type-registry instead of implementing an interface directly.
The registered struct should have the following functions (the compiler will fail without them): EJsonObjectConvertResult ConvertToJson(TSharedPtr<FJsonObject>& OutJsonObject) const; EJsonObjectConvertResult ConvertFromJson(const TSharedPtr<FJsonObject>& InJsonObject);
|
protectedvirtualdefault |
|
pure virtual |
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.
Implemented in TImplementsJsonObjectStructConverter< StructType >.
|
pure virtual |
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.
Implemented in TImplementsJsonObjectStructConverter< StructType >.