QuartzUIStructCodec: declaration reference
0.57.0-dev · beta source documentation. Native, Blueprint, Editor and rendering examples are source-reviewed, not executed in Unreal during this scan. See validation and limits.
Pinned source (source: Source/QuartzUIRuntime/Public/QuartzUIStructCodec.h) · integration recipe · practical guide
FQuartzUIStructCodec
Internal type. Strict bounded JSON decoder paired with FQuartzUIStructPayload's encoder.
Prerequisites / integration: Configured app, explicit reflected value types, saved assets and freshly generated app contract. Use the QuartzUIStructCodec recipe in the host module QuartzUIRuntime.
Minimal example / lifecycle: Use Bind Typed UI Endpoint and Instanced Struct payloads. Temporary copied DTO values; no object reference transport.
Avoid: Confusing simple payload serializer with declared contract decoding. This named helper is runtime-owned; inspect/use it through the owner above rather than constructing it in gameplay.
Exact source line (source: Source/QuartzUIRuntime/Public/QuartzUIStructCodec.h#L9)
Complete header
Source snapshot, not an additional example. Unreal annotations distinguish exposed Blueprint nodes from native-only/private methods.
#pragma once
#include "CoreMinimal.h"
#include "StructUtils/InstancedStruct.h"
class UScriptStruct;
/** Strict bounded JSON decoder paired with FQuartzUIStructPayload's encoder. */
class QUARTZUIRUNTIME_API FQuartzUIStructCodec final
{
public:
/** Decodes exactly the declared DTO; unknown/missing/type-mismatched fields fail. */
static bool TryDeserialize(
const UScriptStruct* StructType,
const FString& PayloadJson,
FInstancedStruct& OutValue,
FString& OutError);
/** Encodes only an initialized exact data-only struct instance. */
static bool TrySerialize(
const FInstancedStruct& Value,
FString& OutPayloadJson,
FString& OutError);
};