Navigation
API > API/Runtime > API/Runtime/JsonUtilities
Class that handles converting Json objects to and from UStructs
| Name | FJsonObjectConverter |
| Type | class |
| Header File | /Engine/Source/Runtime/JsonUtilities/Public/JsonObjectConverter.h |
| Include Path | #include "JsonObjectConverter.h" |
Syntax
class FJsonObjectConverter
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| CustomExportCallback | TDelegate< TSharedPtr< FJsonValue >(FProperty *Property, const void *Value)> | Optional callback that will be run when exporting a single property to Json. | JsonObjectConverter.h |
| CustomImportCallback | TDelegate< bool(const TSharedPtr< FJsonValue > &JsonValue, FProperty *Property, void *Value)> | Optional callback that will be run when importing a single property from Json. | JsonObjectConverter.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| ExportCallback_WriteISO8601Dates | const CustomExportCallback | JsonObjectConverter.h |
Functions
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static bool GetTextFromField
(
const FString& FieldName, |
Convert a Json value to text (takes some hints from the value name) | JsonObjectConverter.h | |
static bool GetTextFromObject
(
const TSharedRef< FJsonObject >& Obj, |
Parse an FText from a json object (assumed to be of the form where keys are culture codes and values are strings) | JsonObjectConverter.h | |
| Converts from a json string containing an array to an array of UStructs | JsonObjectConverter.h | ||
static bool JsonArrayToUStruct
(
const TArray< TSharedPtr< FJsonValue > >& JsonArray, |
Converts from an array of json values to an array of UStructs. | JsonObjectConverter.h | |
static bool JsonAttributesToUStruct
(
const TMap< FString, TSharedPtr< FJsonValue > >& JsonAttributes, |
Converts a set of json attributes (possibly from within a JsonObject) to a UStruct, using importText | JsonObjectConverter.h | |
| Converts from a json string containing an object to a UStruct | JsonObjectConverter.h | ||
static bool JsonObjectToUStruct
(
const TSharedRef< FJsonObject >& JsonObject, |
Converts from a Json Object to a UStruct, using importText | JsonObjectConverter.h | |
static bool JsonObjectToUStruct
(
const TSharedRef< FJsonObject >& JsonObject, |
Templated version of JsonObjectToUStruct | JsonObjectConverter.h | |
static bool JsonValueToUProperty
(
const TSharedPtr< FJsonValue >& JsonValue, |
Converts a single JsonValue to the corresponding FProperty (this may recurse if the property is a UStruct for instance). | JsonObjectConverter.h | |
static FFormatNamedArguments ParseTextArgumentsFromJson
(
const TSharedPtr< const FJsonObject >& JsonObject |
Parses text arguments from Json into a map | JsonObjectConverter.h | |
static FString StandardizeCase
(
const FString& StringIn |
FName case insensitivity can make the casing of UPROPERTIES unpredictable. | JsonObjectConverter.h | |
static TSharedPtr< FJsonValue > UPropertyToJsonValue
(
FProperty* Property, |
* Converts from a FProperty to a Json Value using exportText | JsonObjectConverter.h | |
static bool UStructToFormattedJsonObjectString
(
const UStruct* StructDefinition, |
Wrapper to UStructToJsonObjectString that allows a print policy to be specified. | JsonObjectConverter.h | |
static bool UStructToJsonAttributes
(
const UStruct* StructDefinition, |
Converts from a UStruct to a set of json attributes (possibly from within a JsonObject) | JsonObjectConverter.h | |
static TSharedPtr< FJsonObject > UStructToJsonObject
(
const InStructType& InStruct, |
Templated version of UStructToJsonObject to try and make most of the params. | JsonObjectConverter.h | |
static bool UStructToJsonObject
(
const UStruct* StructDefinition, |
Converts from a UStruct to a Json Object, using exportText | JsonObjectConverter.h | |
static bool UStructToJsonObjectString
(
const InStructType& InStruct, |
Templated version; Converts from a UStruct to a json string containing an object, using exportText | JsonObjectConverter.h | |
static bool UStructToJsonObjectString
(
const UStruct* StructDefinition, |
Converts from a UStruct to a json string containing an object, using exportText | JsonObjectConverter.h |