Navigation
API > API/Runtime > API/Runtime/JsonUtilities
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
void FExampleModule::ShutdownModule() { FJsonObjectStructInterfaceRegistry::UnregisterStructConverter(FExampleStruct::StaticStruct()); }
| Name | TImplementsJsonObjectStructConverter |
| Type | struct |
| Header File | /Engine/Source/Runtime/JsonUtilities/Public/JsonObjectStructInterface.h |
| Include Path | #include "JsonObjectStructInterface.h" |
Syntax
template<typename StructType>
struct TImplementsJsonObjectStructConverter : public IJsonObjectStructConverter
Implements Interfaces
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TImplementsJsonObjectStructConverter() |
JsonObjectStructInterface.h |
Functions
Public
Overridden from IJsonObjectStructConverter
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual EJsonObjectConvertResult ConvertFromJson
(
void* StructMemory, |
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. | JsonObjectStructInterface.h | |
virtual EJsonObjectConvertResult ConvertToJson
(
const void* StructMemory, |
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. | JsonObjectStructInterface.h |