Files
integration/Plugins/UEWingman/Source/UEWingman/Public/WingJson.h

18 lines
677 B
C++

#pragma once
#include "CoreMinimal.h"
#include "WingHandler.h"
#include "WingProperty.h"
#include "Dom/JsonObject.h"
// JSON utility functions used by MCP handlers.
// This is effectively a namespace — all methods are static.
class WingJson
{
public:
static bool PopulateFromJson(FWingProperty& Prop, const FJsonObject* Json, bool AllOptional = false);
static bool PopulateFromJson(TArray<FWingProperty>& Props, const FJsonObject* Json, bool AllOptional = false);
static bool PopulateFromJson(UStruct* StructType, void* Container, const TSharedPtr<FJsonValue>& JsonValue);
static bool PopulateFromJson(UStruct* StructType, void* Container, const FJsonObject* Json);
};