MetaSoul

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
UESJsonLibrary Class Reference

`#include <ESJsonLibrary.h>`

Inheritance diagram for UESJsonLibrary:

## Public Member Functions
| UFUNCTION (BlueprintPure, Category="EmoShapeJson|Utility", meta=(DisplayName="Base64 Encode (String)")) static FString Base64Encode(const FString &Source)
| UFUNCTION (BlueprintPure, Category="EmoShapeJson|Utility", meta=(DisplayName="Base64 Encode (Bytes)")) static FString Base64EncodeBytes(const TArray< uint8 > &Source)
| UFUNCTION (BlueprintPure, Category="EmoShapeJson|Utility", meta=(DisplayName="Base64 Decode (To String)")) static bool Base64Decode(const FString &Source
| UFUNCTION (BlueprintPure, Category="EmoShapeJson|Utility", meta=(DisplayName="Base64 Decode (To Bytes)")) static bool Base64DecodeBytes(const FString &Source
| DECLARE_FUNCTION (execStructToJsonObject)
| UFUNCTION (BlueprintPure, CustomThunk, meta=(DisplayName="To JsonValue (Struct)", BlueprintAutocast, CustomStructureParam="AnyStruct"), Category="Utilities|EmoShapeSocketIO") static UESJsonValue *StructToJsonValue(TFieldPath< FProperty > AnyStruct)
| DECLARE_FUNCTION (execStructToJsonValue)
| DECLARE_FUNCTION (execJsonObjectToStruct)
| DECLARE_FUNCTION (execSaveStructToJsonFile)
| DECLARE_FUNCTION (execLoadJsonFileToStruct)
| UFUNCTION (BlueprintPure, meta=(DisplayName="To JsonValue (Array)", CompactNodeTitle="->", BlueprintAutocast), Category="Utilities|EmoShapeSocketIO") static UESJsonValue *Conv_ArrayToJsonValue(const TArray< UESJsonValue * > &InArray)
| UFUNCTION (BlueprintPure, meta=(DisplayName="To JsonValue (JsonObject)", CompactNodeTitle="->", BlueprintAutocast), Category="Utilities|EmoShapeSocketIO") static UESJsonValue *Conv_JsonObjectToJsonValue(UESJsonObject *InObject)
| UFUNCTION (BlueprintPure, meta=(DisplayName="To JsonValue (Bytes)", CompactNodeTitle="->", BlueprintAutocast), Category="Utilities|EmoShapeSocketIO") static UESJsonValue *Conv_BytesToJsonValue(const TArray< uint8 > &InBytes)
| UFUNCTION (BlueprintPure, meta=(DisplayName="To JsonValue (String)", CompactNodeTitle="->", BlueprintAutocast), Category="Utilities|EmoShapeSocketIO") static UESJsonValue *Conv_StringToJsonValue(const FString &InString)
| UFUNCTION (BlueprintPure, meta=(DisplayName="To JsonValue (Integer)", CompactNodeTitle="->", BlueprintAutocast), Category="Utilities|EmoShapeSocketIO") static UESJsonValue *Conv_IntToJsonValue(int32 InInt)
| UFUNCTION (BlueprintPure, meta=(DisplayName="To JsonValue (Float)", CompactNodeTitle="->", BlueprintAutocast), Category="Utilities|EmoShapeSocketIO") static UESJsonValue *Conv_FloatToJsonValue(float InFloat)
| UFUNCTION (BlueprintPure, meta=(DisplayName="To JsonValue (Bool)", CompactNodeTitle="->", BlueprintAutocast), Category="Utilities|EmoShapeSocketIO") static UESJsonValue *Conv_BoolToJsonValue(bool InBool)
| UFUNCTION (BlueprintPure, meta=(DisplayName="To String (JsonValue)", BlueprintAutocast), Category="Utilities|EmoShapeSocketIO") static FString Conv_EmoShapeJsonValueToString(class UESJsonValue *InValue)
| UFUNCTION (BlueprintPure, meta=(DisplayName="To Integer (JsonValue)", CompactNodeTitle="->", BlueprintAutocast), Category="Utilities|EmoShapeSocketIO") static int32 Conv_JsonValueToInt(class UESJsonValue *InValue)
| UFUNCTION (BlueprintPure, meta=(DisplayName="To Float (JsonValue)", CompactNodeTitle="->", BlueprintAutocast), Category="Utilities|EmoShapeSocketIO") static float Conv_JsonValueToFloat(class UESJsonValue *InValue)
| UFUNCTION (BlueprintPure, meta=(DisplayName="To Bool (JsonValue)", CompactNodeTitle="->", BlueprintAutocast), Category="Utilities|EmoShapeSocketIO") static bool Conv_JsonValueToBool(class UESJsonValue *InValue)
| UFUNCTION (BlueprintPure, meta=(DisplayName="To Bytes (JsonValue)", CompactNodeTitle="->", BlueprintAutocast), Category="Utilities|EmoShapeSocketIO") static TArray< uint8 > Conv_JsonValueToBytes(class UESJsonValue *InValue)
| UFUNCTION (BlueprintPure, meta=(DisplayName="To String (JsonObject)", BlueprintAutocast), Category="Utilities|EmoShapeSocketIO") static FString Conv_EmoShapeJsonObjectToString(class UESJsonObject *InObject)
| UFUNCTION (BlueprintPure, meta=(DisplayName="To Object (JsonValue)", CompactNodeTitle="->", BlueprintAutocast), Category="Utilities|EmoShapeSocketIO") static UESJsonObject *Conv_JsonValueToJsonObject(class UESJsonValue *InValue)

## Static Public Member Functions
static FString | PercentEncode (const FString &Source)
static bool | StringToJsonValueArray (const FString &JsonString, TArray< UESJsonValue * > &OutJsonValueArray)
static UESJsonObject * | StructToJsonObject (TFieldPath< FProperty > AnyStruct)
static bool | JsonObjectToStruct (UESJsonObject *JsonObject, TFieldPath< FProperty > AnyStruct)
static bool | SaveStructToJsonFile (TFieldPath< FProperty > AnyStruct, const FString &FilePath)
static bool | LoadJsonFileToStruct (const FString &FilePath, TFieldPath< FProperty > AnyStruct)
static void | CallURL (UObject *WorldContextObject, const FString &URL, EEmoShapeIORequestVerb Verb, EEmoShapeIORequestContentType ContentType, UESJsonObject *EmoShapeJJson, const FEmoShapeJsonCallDelegate &Callback)
static void | GetURLBinary (UObject *WorldContextObject, const FString &URL, EEmoShapeIORequestVerb Verb, EEmoShapeIORequestContentType ContentType, TArray< uint8 > &OutResultData, struct FLatentActionInfo LatentInfo)
static void | OnCallComplete (UESRequestJSON *Request)

## Public Attributes
FString & | Dest
TArray< uint8 > & | Dest

## Member Function Documentation

## ◆ CallURL()

void UESJsonLibrary::CallURL | ( | UObject * | WorldContextObject,
|  | const FString & | URL,
|  | EEmoShapeIORequestVerb | Verb,
|  | EEmoShapeIORequestContentType | ContentType,
|  | UESJsonObject * | EmoShapeJJson,
|  | const FEmoShapeJsonCallDelegate & | Callback )
| static

Easy way to process http requests

## ◆ DECLARE_FUNCTION() [1/5]

UESJsonLibrary::DECLARE_FUNCTION | ( | execJsonObjectToStruct |  | ) |
| inline

## ◆ DECLARE_FUNCTION() [2/5]

UESJsonLibrary::DECLARE_FUNCTION | ( | execLoadJsonFileToStruct |  | ) |
| inline

## ◆ DECLARE_FUNCTION() [3/5]

UESJsonLibrary::DECLARE_FUNCTION | ( | execSaveStructToJsonFile |  | ) |
| inline

## ◆ DECLARE_FUNCTION() [4/5]

UESJsonLibrary::DECLARE_FUNCTION | ( | execStructToJsonObject |  | ) |
| inline

## ◆ DECLARE_FUNCTION() [5/5]

UESJsonLibrary::DECLARE_FUNCTION | ( | execStructToJsonValue |  | ) |
| inline

## ◆ GetURLBinary()

void UESJsonLibrary::GetURLBinary | ( | UObject * | WorldContextObject,
|  | const FString & | URL,
|  | EEmoShapeIORequestVerb | Verb,
|  | EEmoShapeIORequestContentType | ContentType,
|  | TArray< uint8 > & | OutResultData,
|  | struct FLatentActionInfo | LatentInfo )
| static

Easy way to fetch resources using get

## ◆ JsonObjectToStruct()

static bool UESJsonLibrary::JsonObjectToStruct | ( | UESJsonObject * | JsonObject,
|  | TFieldPath< FProperty > | AnyStruct )
| static

Uses the reflection system to fill an unreal struct from data defined in JsonObject.

Parameters

  JsonObject | The source JsonObject for properties to fill
  AnyStruct | The struct you wish to fill

Returns
  Whether all properties filled correctly

## ◆ LoadJsonFileToStruct()

static bool UESJsonLibrary::LoadJsonFileToStruct | ( | const FString & | FilePath,
|  | TFieldPath< FProperty > | AnyStruct )
| static

## ◆ OnCallComplete()

void UESJsonLibrary::OnCallComplete | ( | UESRequestJSON * | Request | ) |
| static

Called when URL is processed (one for both success/unsuccess events)

## ◆ PercentEncode()

FString UESJsonLibrary::PercentEncode | ( | const FString & | Source | ) |
| static

Applies percent-encoding to text

## ◆ SaveStructToJsonFile()

static bool UESJsonLibrary::SaveStructToJsonFile | ( | TFieldPath< FProperty > | AnyStruct,
|  | const FString & | FilePath )
| static

## ◆ StringToJsonValueArray()

bool UESJsonLibrary::StringToJsonValueArray | ( | const FString & | JsonString,
|  | TArray< UESJsonValue * > & | OutJsonValueArray )
| static

Decodes a json string into an array of stringified json Values

Parameters

  JsonString | Input stringified json
  OutJsonValueArray | The decoded Array of JsonValue

## ◆ StructToJsonObject()

static UESJsonObject * UESJsonLibrary::StructToJsonObject | ( | TFieldPath< FProperty > | AnyStruct | ) |
| static

Uses the reflection system to convert an unreal struct into a JsonObject

Parameters

  AnyStruct | The struct you wish to convert

Returns
  Converted Json Object

## ◆ UFUNCTION() [1/19]

UESJsonLibrary::UFUNCTION | ( | BlueprintPure | ,
|  | Category | = "EmoShapeJson|Utility",
|  | meta | = (DisplayName = "Base64 Decode (To Bytes)") ) const &

Decodes a Base64 string into a Byte array

Parameters

  Source | The stringified data to convert
  Dest | The out buffer that will be filled with the decoded data

Returns
  True if the buffer was decoded, false if it failed to decode

## ◆ UFUNCTION() [2/19]

UESJsonLibrary::UFUNCTION | ( | BlueprintPure | ,
|  | Category | = "EmoShapeJson|Utility",
|  | meta | = (DisplayName = "Base64 Decode (To String)") ) const &

Decodes a Base64 string into a FString

Parameters

  Source | The stringified data to convert
  Dest | The out buffer that will be filled with the decoded data

Returns
  True if the buffer was decoded, false if it failed to decode

## ◆ UFUNCTION() [3/19]

UESJsonLibrary::UFUNCTION | ( | BlueprintPure | ,
|  | Category | = "EmoShapeJson|Utility",
|  | meta | = (DisplayName="Base64 Encode (Bytes)") ) const &

Encodes a Byte array into a Base64 string

Parameters

  Source | The string data to convert

Returns
  A string that encodes the binary data in a way that can be safely transmitted via various Internet protocols

## ◆ UFUNCTION() [4/19]

UESJsonLibrary::UFUNCTION | ( | BlueprintPure | ,
|  | Category | = "EmoShapeJson|Utility",
|  | meta | = (DisplayName="Base64 Encode (String)") ) const &

Encodes a FString into a Base64 string

Parameters

  Source | The string data to convert

Returns
  A string that encodes the binary data in a way that can be safely transmitted via various Internet protocols

## ◆ UFUNCTION() [5/19]

UESJsonLibrary::UFUNCTION | ( | BlueprintPure | ,
|  | CustomThunk | ,
|  | meta | = (DisplayName="To JsonValue (Struct)", BlueprintAutocast, CustomStructureParam="AnyStruct"),
|  | Category | = "Utilities|EmoShapeSocketIO" )

## ◆ UFUNCTION() [6/19]

UESJsonLibrary::UFUNCTION | ( | BlueprintPure | ,
|  | meta | = (DisplayName="To Bool (JsonValue)", CompactNodeTitle="->", BlueprintAutocast),
|  | Category | = "Utilities|EmoShapeSocketIO" )

## ◆ UFUNCTION() [7/19]

UESJsonLibrary::UFUNCTION | ( | BlueprintPure | ,
|  | meta | = (DisplayName="To Bytes (JsonValue)", CompactNodeTitle="->", BlueprintAutocast),
|  | Category | = "Utilities|EmoShapeSocketIO" )

## ◆ UFUNCTION() [8/19]

UESJsonLibrary::UFUNCTION | ( | BlueprintPure | ,
|  | meta | = (DisplayName="To Float (JsonValue)", CompactNodeTitle="->", BlueprintAutocast),
|  | Category | = "Utilities|EmoShapeSocketIO" )

## ◆ UFUNCTION() [9/19]

UESJsonLibrary::UFUNCTION | ( | BlueprintPure | ,
|  | meta | = (DisplayName="To Integer (JsonValue)", CompactNodeTitle="->", BlueprintAutocast),
|  | Category | = "Utilities|EmoShapeSocketIO" )

## ◆ UFUNCTION() [10/19]

UESJsonLibrary::UFUNCTION | ( | BlueprintPure | ,
|  | meta | = (DisplayName="To JsonValue (Array)", CompactNodeTitle="->", BlueprintAutocast),
|  | Category | = "Utilities|EmoShapeSocketIO" ) const &

## ◆ UFUNCTION() [11/19]

UESJsonLibrary::UFUNCTION | ( | BlueprintPure | ,
|  | meta | = (DisplayName="To JsonValue (Bool)", CompactNodeTitle="->", BlueprintAutocast),
|  | Category | = "Utilities|EmoShapeSocketIO" )

## ◆ UFUNCTION() [12/19]

UESJsonLibrary::UFUNCTION | ( | BlueprintPure | ,
|  | meta | = (DisplayName="To JsonValue (Bytes)", CompactNodeTitle="->", BlueprintAutocast),
|  | Category | = "Utilities|EmoShapeSocketIO" ) const &

## ◆ UFUNCTION() [13/19]

UESJsonLibrary::UFUNCTION | ( | BlueprintPure | ,
|  | meta | = (DisplayName="To JsonValue (Float)", CompactNodeTitle="->", BlueprintAutocast),
|  | Category | = "Utilities|EmoShapeSocketIO" )

## ◆ UFUNCTION() [14/19]

UESJsonLibrary::UFUNCTION | ( | BlueprintPure | ,
|  | meta | = (DisplayName="To JsonValue (Integer)", CompactNodeTitle="->", BlueprintAutocast),
|  | Category | = "Utilities|EmoShapeSocketIO" )

## ◆ UFUNCTION() [15/19]

UESJsonLibrary::UFUNCTION | ( | BlueprintPure | ,
|  | meta | = (DisplayName="To JsonValue (JsonObject)", CompactNodeTitle="->", BlueprintAutocast),
|  | Category | = "Utilities|EmoShapeSocketIO" )

## ◆ UFUNCTION() [16/19]

UESJsonLibrary::UFUNCTION | ( | BlueprintPure | ,
|  | meta | = (DisplayName="To JsonValue (String)", CompactNodeTitle="->", BlueprintAutocast),
|  | Category | = "Utilities|EmoShapeSocketIO" ) const &

## ◆ UFUNCTION() [17/19]

UESJsonLibrary::UFUNCTION | ( | BlueprintPure | ,
|  | meta | = (DisplayName="To Object (JsonValue)", CompactNodeTitle="->", BlueprintAutocast),
|  | Category | = "Utilities|EmoShapeSocketIO" )

## ◆ UFUNCTION() [18/19]

UESJsonLibrary::UFUNCTION | ( | BlueprintPure | ,
|  | meta | = (DisplayName="To String (JsonObject)", BlueprintAutocast),
|  | Category | = "Utilities|EmoShapeSocketIO" )

## ◆ UFUNCTION() [19/19]

UESJsonLibrary::UFUNCTION | ( | BlueprintPure | ,
|  | meta | = (DisplayName="To String (JsonValue)", BlueprintAutocast),
|  | Category | = "Utilities|EmoShapeSocketIO" )

## Member Data Documentation

## ◆ Dest [1/2]

FString& UESJsonLibrary::Dest

## ◆ Dest [2/2]

TArray<uint8>& UESJsonLibrary::Dest

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

- EmoShapeJson/Public/ESJsonLibrary.h
- EmoShapeJson/Private/ESJsonLibrary.cpp