UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FJsonDataBag Struct Reference

#include <JsonDataBag.h>

+ Inheritance diagram for FJsonDataBag:

Public Member Functions

virtual JSON_API void Serialize (FJsonSerializerBase &Serializer, bool bFlatObject) override
 
JSON_API double GetDouble (const FString &Key) const
 
JSON_API FString GetString (const FString &Key) const
 
JSON_API bool GetBool (const FString &Key) const
 
JSON_API TSharedPtr< const FJsonValueGetField (const FString &Key) const
 
template<typename JSON_TYPE , typename Arg >
void SetField (const FString &Key, Arg &&Value)
 
JSON_API void SetFieldJson (const FString &Key, const TSharedPtr< FJsonValue > &Value)
 
- Public Member Functions inherited from FJsonSerializable
virtual JSON_API ~FJsonSerializable ()
 
JSON_API const FString ToJson (bool bPrettyPrint=true) const
 
JSON_API const FUtf8String ToJsonUtf8 (bool bPrettyPrint=true) const
 
virtual JSON_API const FString ToJson (bool bPrettyPrint=true)
 
virtual JSON_API const FUtf8String ToJsonUtf8 (bool bPrettyPrint=true)
 
template<class CharType , class PrintPolicy , ESPMode SPMode>
void ToJson (TSharedRef< TJsonWriter< CharType, PrintPolicy >, SPMode > JsonWriter, bool bFlatObject=false) const
 
virtual JSON_API bool FromJson (const TCHAR *Json)
 
virtual JSON_API bool FromJson (const UTF8CHAR *Json)
 
virtual JSON_API bool FromJson (const FString &Json)
 
virtual JSON_API bool FromJson (const FUtf8String &Json)
 
virtual JSON_API bool FromJson (FString &&Json)
 
virtual JSON_API bool FromJson (FUtf8String &&Json)
 
JSON_API bool FromJsonStringView (FUtf8StringView JsonStringView)
 
JSON_API bool FromJsonStringView (FWideStringView JsonStringView)
 
virtual JSON_API bool FromJson (TSharedPtr< FJsonObject > JsonObject)
 

Public Attributes

TSharedPtr< FJsonObjectJsonObject
 
TOptional< int32NumPrintIndents
 

Detailed Description

Useful if you just want access to the underlying FJsonObject (for cases where the schema is loose or an outer system will do further de/serialization)

Member Function Documentation

◆ GetBool()

bool FJsonDataBag::GetBool ( const FString &  Key) const

◆ GetDouble()

double FJsonDataBag::GetDouble ( const FString &  Key) const

◆ GetField()

TSharedPtr< const FJsonValue > FJsonDataBag::GetField ( const FString &  Key) const

◆ GetString()

FString FJsonDataBag::GetString ( const FString &  Key) const

◆ Serialize()

void FJsonDataBag::Serialize ( FJsonSerializerBase Serializer,
bool  bFlatObject 
)
overridevirtual

Abstract method that needs to be supplied using the macros

Parameters
Serializerthe object that will perform serialization in/out of JSON
bFlatObjectif true then no object wrapper is used

Implements FJsonSerializable.

◆ SetField()

template<typename JSON_TYPE , typename Arg >
void FJsonDataBag::SetField ( const FString &  Key,
Arg &&  Value 
)
inline

◆ SetFieldJson()

void FJsonDataBag::SetFieldJson ( const FString &  Key,
const TSharedPtr< FJsonValue > &  Value 
)

Member Data Documentation

◆ JsonObject

TSharedPtr<FJsonObject> FJsonDataBag::JsonObject

◆ NumPrintIndents

TOptional<int32> FJsonDataBag::NumPrintIndents

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