FJsonObjectConverter::UStructToJsonObjectString

Templated version; Converts from a [UStruct](API\Runtime\CoreUObject\UObject\UStruct) to a json string containing an object, using exportText

Windows
MacOS
Linux

References

Module

JsonUtilities

Header

/Engine/Source/Runtime/JsonUtilities/Public/JsonObjectConverter.h

Include

#include "JsonObjectConverter.h"

Syntax

template<typename InStructType>
static bool UStructToJsonObjectString
(
    const InStructType & InStruct,
    FString & OutJsonString,
    int64 CheckFlags,
    int64 SkipFlags,
    int32 Indent,
    const CustomExportCallback * ExportCb,
    bool bPrettyPrint
)

Remarks

Templated version; Converts from a UStruct to a json string containing an object, using exportText

Returns

False if any properties failed to write

Parameters

Parameter

Description

Struct

The UStruct instance to copy out of

JsonObject

Json Object to be filled in with data from the ustruct

CheckFlags

Only convert properties that match at least one of these flags. If 0 check all properties.

SkipFlags

Skip properties that match any of these flags

Indent

How many tabs to add to the json serializer

ExportCb

Optional callback for types we don't understand. This is called right before falling back to the generic ToString()

bPrettyPrint

Option to use pretty print (e.g., adds line endings) or condensed print

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback