A Demo Project for the UnrealEngineSDK
Loading...
Searching...
No Matches
UVaRestJsonObject Class ReferenceBlueprintTypeBlueprintable

UCLASS(BlueprintType, Blueprintable) More...

#include <VaRestJsonObject.h>

Inheritance diagram for UVaRestJsonObject:
[legend]

Public Member Functions

void DecodeFromArchive (TUniquePtr< FArchive > &Reader)
 
bool DecodeJson (const FString &JsonString, bool bUseIncrementalParser=true)
 UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
 
int32 DeserializeFromTCHARBytes (const TCHAR *Bytes, int32 Size)
 
int32 DeserializeFromUTF8Bytes (const ANSICHAR *Bytes, int32 Size)
 
FString EncodeJson () const
 UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
 
FString EncodeJsonToSingleString () const
 UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
 
TArray< UVaRestJsonValue * > GetArrayField (const FString &FieldName) const
 UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
 
TArray< boolGetBoolArrayField (const FString &FieldName) const
 UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
 
bool GetBoolField (const FString &FieldName) const
 UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
 
UVaRestJsonValueGetField (const FString &FieldName) const
 UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
 
TArray< FString > GetFieldNames () const
 UFUNCTION(BlueprintPure, Category = "VaRest|Json")
 
int64 GetInt64Field (const FString &FieldName) const
 UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
 
TArray< int32 > GetIntegerArrayField (const FString &FieldName) const
 UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
 
int32 GetIntegerField (const FString &FieldName) const
 UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
 
TArray< float > GetNumberArrayField (const FString &FieldName) const
 UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
 
float GetNumberField (const FString &FieldName) const
 UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
 
TArray< UVaRestJsonObject * > GetObjectArrayField (const FString &FieldName) const
 UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
 
UVaRestJsonObjectGetObjectField (const FString &FieldName) const
 UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
 
TSharedRef< FJsonObject > & GetRootObject ()
 
TArray< FString > GetStringArrayField (const FString &FieldName) const
 UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
 
FString GetStringField (const FString &FieldName) const
 UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
 
bool HasField (const FString &FieldName) const
 UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
 
void MergeJsonObject (UVaRestJsonObject *InJsonObject, bool Overwrite)
 UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
 
void RemoveField (const FString &FieldName)
 UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
 
void Reset ()
 UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
 
void SetArrayField (const FString &FieldName, const TArray< UVaRestJsonValue * > &InArray)
 UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
 
void SetBoolArrayField (const FString &FieldName, const TArray< bool > &BoolArray)
 UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
 
void SetBoolField (const FString &FieldName, bool InValue)
 UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
 
void SetField (const FString &FieldName, UVaRestJsonValue *JsonValue)
 UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
 
void SetInt64Field (const FString &FieldName, int64 Number)
 UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
 
void SetIntegerField (const FString &FieldName, int32 Number)
 UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
 
void SetMapFields_bool (const TMap< FString, bool > &Fields)
 UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
 
void SetMapFields_int32 (const TMap< FString, int32 > &Fields)
 UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
 
void SetMapFields_int64 (const TMap< FString, int64 > &Fields)
 UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
 
void SetMapFields_string (const TMap< FString, FString > &Fields)
 UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
 
void SetMapFields_uint8 (const TMap< FString, uint8 > &Fields)
 UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
 
void SetNumberArrayField (const FString &FieldName, const TArray< float > &NumberArray)
 UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
 
void SetNumberField (const FString &FieldName, float Number)
 UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
 
void SetObjectArrayField (const FString &FieldName, const TArray< UVaRestJsonObject * > &ObjectArray)
 UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
 
void SetObjectField (const FString &FieldName, UVaRestJsonObject *JsonObject)
 UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
 
void SetRootObject (const TSharedPtr< FJsonObject > &JsonObject)
 
void SetStringArrayField (const FString &FieldName, const TArray< FString > &StringArray)
 UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
 
void SetStringField (const FString &FieldName, const FString &StringValue)
 UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
 
bool WriteToFile (const FString &Path) const
 
bool WriteToFilePath (const FString &Path, const bool bIsRelativeToProjectDir=true)
 UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
 

Static Public Member Functions

static bool WriteStringToArchive (FArchive &Ar, const TCHAR *StrPtr, int64 Len)
 

Private Member Functions

 GENERATED_UCLASS_BODY ()
 
template<typename T >
TArray< T > GetTypeArrayField (const FString &FieldName) const
 
template<typename T >
void SetMapFields_Impl (const TMap< FString, T > &Fields)
 

Private Attributes

TSharedRef< FJsonObjectJsonObj
 

Detailed Description

UCLASS(BlueprintType, Blueprintable)

Blueprintable FJsonObject wrapper

Definition at line 22 of file VaRestJsonObject.h.

Member Function Documentation

◆ DecodeFromArchive()

void UVaRestJsonObject::DecodeFromArchive ( TUniquePtr< FArchive > & Reader)

Deserialize byte stream from reader

Definition at line 611 of file VaRestJsonObject.cpp.

Here is the call graph for this function:

◆ DecodeJson()

bool UVaRestJsonObject::DecodeJson ( const FString & JsonString,
bool bUseIncrementalParser = true )
BlueprintCallable

UFUNCTION(BlueprintCallable, Category = "VaRest|Json")

Construct Json object from string

Definition at line 64 of file VaRestJsonObject.cpp.

Here is the call graph for this function:

◆ DeserializeFromTCHARBytes()

int32 UVaRestJsonObject::DeserializeFromTCHARBytes ( const TCHAR * Bytes,
int32 Size )

Deserialize byte content to json

Definition at line 594 of file VaRestJsonObject.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DeserializeFromUTF8Bytes()

int32 UVaRestJsonObject::DeserializeFromUTF8Bytes ( const ANSICHAR * Bytes,
int32 Size )

Deserialize byte content to json

Definition at line 571 of file VaRestJsonObject.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EncodeJson()

FString UVaRestJsonObject::EncodeJson ( ) const
BlueprintCallable

UFUNCTION(BlueprintCallable, Category = "VaRest|Json")

Serialize Json to string (formatted with line breaks)

Definition at line 46 of file VaRestJsonObject.cpp.

Here is the caller graph for this function:

◆ EncodeJsonToSingleString()

FString UVaRestJsonObject::EncodeJsonToSingleString ( ) const
BlueprintCallable

UFUNCTION(BlueprintCallable, Category = "VaRest|Json")

Serialize Json to string (single string without line breaks)

Definition at line 55 of file VaRestJsonObject.cpp.

◆ GENERATED_UCLASS_BODY()

UVaRestJsonObject::GENERATED_UCLASS_BODY ( )
private

◆ GetArrayField()

TArray< UVaRestJsonValue * > UVaRestJsonObject::GetArrayField ( const FString & FieldName) const
BlueprintCallable

UFUNCTION(BlueprintCallable, Category = "VaRest|Json")

Get the field named FieldName as a Json Array

Definition at line 263 of file VaRestJsonObject.cpp.

Here is the call graph for this function:

◆ GetBoolArrayField()

TArray< bool > UVaRestJsonObject::GetBoolArrayField ( const FString & FieldName) const
BlueprintCallable

UFUNCTION(BlueprintCallable, Category = "VaRest|Json")

Get the field named FieldName as a Bool Array. Use it only if you're sure that array is uniform!

Definition at line 484 of file VaRestJsonObject.cpp.

Here is the call graph for this function:

◆ GetBoolField()

bool UVaRestJsonObject::GetBoolField ( const FString & FieldName) const
BlueprintCallable

UFUNCTION(BlueprintCallable, Category = "VaRest|Json")

Get the field named FieldName as a boolean.

Definition at line 242 of file VaRestJsonObject.cpp.

Here is the caller graph for this function:

◆ GetField()

UVaRestJsonValue * UVaRestJsonObject::GetField ( const FString & FieldName) const
BlueprintCallable

UFUNCTION(BlueprintCallable, Category = "VaRest|Json")

Get the field named FieldName as a JsonValue

Definition at line 126 of file VaRestJsonObject.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetFieldNames()

TArray< FString > UVaRestJsonObject::GetFieldNames ( ) const
BlueprintPure

UFUNCTION(BlueprintPure, Category = "VaRest|Json")

Returns a list of field names that exist in the object

Definition at line 98 of file VaRestJsonObject.cpp.

Here is the caller graph for this function:

◆ GetInt64Field()

int64 UVaRestJsonObject::GetInt64Field ( const FString & FieldName) const
BlueprintCallable

UFUNCTION(BlueprintCallable, Category = "VaRest|Json")

Get the field named FieldName as an Int64. Ensures that the field is present and is of type Json number.

Definition at line 200 of file VaRestJsonObject.cpp.

◆ GetIntegerArrayField()

TArray< int32 > UVaRestJsonObject::GetIntegerArrayField ( const FString & FieldName) const
BlueprintCallable

UFUNCTION(BlueprintCallable, Category = "VaRest|Json")

Get the field named FieldName as a Number Array. Use it only if you're sure that array is uniform!

Definition at line 422 of file VaRestJsonObject.cpp.

Here is the call graph for this function:

◆ GetIntegerField()

int32 UVaRestJsonObject::GetIntegerField ( const FString & FieldName) const
BlueprintCallable

UFUNCTION(BlueprintCallable, Category = "VaRest|Json")

Get the field named FieldName as an Integer. Ensures that the field is present and is of type Json number.

Definition at line 179 of file VaRestJsonObject.cpp.

◆ GetNumberArrayField()

TArray< float > UVaRestJsonObject::GetNumberArrayField ( const FString & FieldName) const
BlueprintCallable

UFUNCTION(BlueprintCallable, Category = "VaRest|Json")

Get the field named FieldName as a Number Array. Use it only if you're sure that array is uniform! Attn.!! float used instead of double to make the function blueprintable!

Definition at line 417 of file VaRestJsonObject.cpp.

Here is the call graph for this function:

◆ GetNumberField()

float UVaRestJsonObject::GetNumberField ( const FString & FieldName) const
BlueprintCallable

UFUNCTION(BlueprintCallable, Category = "VaRest|Json")

Get the field named FieldName as a number. Ensures that the field is present and is of type Json number. Attn.!! float used instead of double to make the function blueprintable!

Definition at line 158 of file VaRestJsonObject.cpp.

◆ GetObjectArrayField()

TArray< UVaRestJsonObject * > UVaRestJsonObject::GetObjectArrayField ( const FString & FieldName) const
BlueprintCallable

UFUNCTION(BlueprintCallable, Category = "VaRest|Json")

Get the field named FieldName as an Object Array. Use it only if you're sure that array is uniform!

Definition at line 524 of file VaRestJsonObject.cpp.

Here is the call graph for this function:

◆ GetObjectField()

UVaRestJsonObject * UVaRestJsonObject::GetObjectField ( const FString & FieldName) const
BlueprintCallable

UFUNCTION(BlueprintCallable, Category = "VaRest|Json")

Get the field named FieldName as a Json object.

Definition at line 360 of file VaRestJsonObject.cpp.

Here is the call graph for this function:

◆ GetRootObject()

TSharedRef< FJsonObject > & UVaRestJsonObject::GetRootObject ( )

Get the root Json object

Definition at line 25 of file VaRestJsonObject.cpp.

Here is the caller graph for this function:

◆ GetStringArrayField()

TArray< FString > UVaRestJsonObject::GetStringArrayField ( const FString & FieldName) const
BlueprintCallable

UFUNCTION(BlueprintCallable, Category = "VaRest|Json")

Get the field named FieldName as a String Array. Use it only if you're sure that array is uniform!

Definition at line 444 of file VaRestJsonObject.cpp.

Here is the call graph for this function:

◆ GetStringField()

FString UVaRestJsonObject::GetStringField ( const FString & FieldName) const
BlueprintCallable

UFUNCTION(BlueprintCallable, Category = "VaRest|Json")

Get the field named FieldName as a string.

Definition at line 221 of file VaRestJsonObject.cpp.

◆ GetTypeArrayField()

template<typename T >
TArray< T > UVaRestJsonObject::GetTypeArrayField ( const FString & FieldName) const
inlineprivate

Internal implementation to get number arrays of different types

Definition at line 268 of file VaRestJsonObject.h.

Here is the caller graph for this function:

◆ HasField()

bool UVaRestJsonObject::HasField ( const FString & FieldName) const
BlueprintCallable

UFUNCTION(BlueprintCallable, Category = "VaRest|Json")

Checks to see if the FieldName exists in the object

Definition at line 106 of file VaRestJsonObject.cpp.

Here is the caller graph for this function:

◆ MergeJsonObject()

void UVaRestJsonObject::MergeJsonObject ( UVaRestJsonObject * InJsonObject,
bool Overwrite )
BlueprintCallable

UFUNCTION(BlueprintCallable, Category = "VaRest|Json")

Adds all of the fields from one json object to this one

Definition at line 340 of file VaRestJsonObject.cpp.

Here is the call graph for this function:

◆ RemoveField()

void UVaRestJsonObject::RemoveField ( const FString & FieldName)
BlueprintCallable

UFUNCTION(BlueprintCallable, Category = "VaRest|Json")

Remove field named FieldName

Definition at line 116 of file VaRestJsonObject.cpp.

◆ Reset()

void UVaRestJsonObject::Reset ( )
BlueprintCallable

UFUNCTION(BlueprintCallable, Category = "VaRest|Json")

Reset all internal data

Definition at line 20 of file VaRestJsonObject.cpp.

Here is the caller graph for this function:

◆ SetArrayField()

void UVaRestJsonObject::SetArrayField ( const FString & FieldName,
const TArray< UVaRestJsonValue * > & InArray )
BlueprintCallable

UFUNCTION(BlueprintCallable, Category = "VaRest|Json")

Set an ObjectField named FieldName and value of Json Array

Definition at line 289 of file VaRestJsonObject.cpp.

◆ SetBoolArrayField()

void UVaRestJsonObject::SetBoolArrayField ( const FString & FieldName,
const TArray< bool > & BoolArray )
BlueprintCallable

UFUNCTION(BlueprintCallable, Category = "VaRest|Json")

Set an ObjectField named FieldName and value of Bool Array

Definition at line 508 of file VaRestJsonObject.cpp.

Here is the call graph for this function:

◆ SetBoolField()

void UVaRestJsonObject::SetBoolField ( const FString & FieldName,
bool InValue )
BlueprintCallable

UFUNCTION(BlueprintCallable, Category = "VaRest|Json")

Set a boolean field named FieldName and value of InValue

Definition at line 253 of file VaRestJsonObject.cpp.

Here is the caller graph for this function:

◆ SetField()

void UVaRestJsonObject::SetField ( const FString & FieldName,
UVaRestJsonValue * JsonValue )
BlueprintCallable

UFUNCTION(BlueprintCallable, Category = "VaRest|Json")

Add a field named FieldName with a Value

Definition at line 145 of file VaRestJsonObject.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetInt64Field()

void UVaRestJsonObject::SetInt64Field ( const FString & FieldName,
int64 Number )
BlueprintCallable

UFUNCTION(BlueprintCallable, Category = "VaRest|Json")

Add a field named FieldName with Int64 as value.

Definition at line 211 of file VaRestJsonObject.cpp.

◆ SetIntegerField()

void UVaRestJsonObject::SetIntegerField ( const FString & FieldName,
int32 Number )
BlueprintCallable

UFUNCTION(BlueprintCallable, Category = "VaRest|Json")

Add a field named FieldName with Integer as value.

Definition at line 190 of file VaRestJsonObject.cpp.

◆ SetMapFields_bool()

void UVaRestJsonObject::SetMapFields_bool ( const TMap< FString, bool > & Fields)
BlueprintCallable

UFUNCTION(BlueprintCallable, Category = "VaRest|Json")

Set a map of fields with bool values

Definition at line 409 of file VaRestJsonObject.cpp.

Here is the call graph for this function:

◆ SetMapFields_Impl()

template<typename T >
void UVaRestJsonObject::SetMapFields_Impl ( const TMap< FString, T > & Fields)
inlineprivate

Internal implementation for setting map fields.

Definition at line 250 of file VaRestJsonObject.h.

Here is the caller graph for this function:

◆ SetMapFields_int32()

void UVaRestJsonObject::SetMapFields_int32 ( const TMap< FString, int32 > & Fields)
BlueprintCallable

UFUNCTION(BlueprintCallable, Category = "VaRest|Json")

Set a map of fields with int32 values

Definition at line 399 of file VaRestJsonObject.cpp.

Here is the call graph for this function:

◆ SetMapFields_int64()

void UVaRestJsonObject::SetMapFields_int64 ( const TMap< FString, int64 > & Fields)
BlueprintCallable

UFUNCTION(BlueprintCallable, Category = "VaRest|Json")

Set a map of fields with int64 values

Definition at line 404 of file VaRestJsonObject.cpp.

Here is the call graph for this function:

◆ SetMapFields_string()

void UVaRestJsonObject::SetMapFields_string ( const TMap< FString, FString > & Fields)
BlueprintCallable

UFUNCTION(BlueprintCallable, Category = "VaRest|Json")

Set a map of fields with String values

Definition at line 386 of file VaRestJsonObject.cpp.

Here is the call graph for this function:

◆ SetMapFields_uint8()

void UVaRestJsonObject::SetMapFields_uint8 ( const TMap< FString, uint8 > & Fields)
BlueprintCallable

UFUNCTION(BlueprintCallable, Category = "VaRest|Json")

Set a map of fields with uint8 values

Definition at line 394 of file VaRestJsonObject.cpp.

Here is the call graph for this function:

◆ SetNumberArrayField()

void UVaRestJsonObject::SetNumberArrayField ( const FString & FieldName,
const TArray< float > & NumberArray )
BlueprintCallable

UFUNCTION(BlueprintCallable, Category = "VaRest|Json")

Set an ObjectField named FieldName and value of Number Array Attn.!! float used instead of double to make the function blueprintable!

Definition at line 427 of file VaRestJsonObject.cpp.

Here is the call graph for this function:

◆ SetNumberField()

void UVaRestJsonObject::SetNumberField ( const FString & FieldName,
float Number )
BlueprintCallable

UFUNCTION(BlueprintCallable, Category = "VaRest|Json")

Add a field named FieldName with Number as value Attn.!! float used instead of double to make the function blueprintable!

Definition at line 169 of file VaRestJsonObject.cpp.

◆ SetObjectArrayField()

void UVaRestJsonObject::SetObjectArrayField ( const FString & FieldName,
const TArray< UVaRestJsonObject * > & ObjectArray )
BlueprintCallable

UFUNCTION(BlueprintCallable, Category = "VaRest|Json")

Set an ObjectField named FieldName and value of Ob Array

Definition at line 552 of file VaRestJsonObject.cpp.

Here is the call graph for this function:

◆ SetObjectField()

void UVaRestJsonObject::SetObjectField ( const FString & FieldName,
UVaRestJsonObject * JsonObject )
BlueprintCallable

UFUNCTION(BlueprintCallable, Category = "VaRest|Json")

Set an ObjectField named FieldName and value of JsonObject

Definition at line 376 of file VaRestJsonObject.cpp.

Here is the call graph for this function:

◆ SetRootObject()

void UVaRestJsonObject::SetRootObject ( const TSharedPtr< FJsonObject > & JsonObject)

Set the root Json object

Definition at line 30 of file VaRestJsonObject.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetStringArrayField()

void UVaRestJsonObject::SetStringArrayField ( const FString & FieldName,
const TArray< FString > & StringArray )
BlueprintCallable

UFUNCTION(BlueprintCallable, Category = "VaRest|Json")

Set an ObjectField named FieldName and value of String Array

Definition at line 468 of file VaRestJsonObject.cpp.

Here is the call graph for this function:

◆ SetStringField()

void UVaRestJsonObject::SetStringField ( const FString & FieldName,
const FString & StringValue )
BlueprintCallable

UFUNCTION(BlueprintCallable, Category = "VaRest|Json")

Add a field named FieldName with value of StringValue

Definition at line 232 of file VaRestJsonObject.cpp.

Here is the caller graph for this function:

◆ WriteStringToArchive()

bool UVaRestJsonObject::WriteStringToArchive ( FArchive & Ar,
const TCHAR * StrPtr,
int64 Len )
static

Definition at line 727 of file VaRestJsonObject.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ WriteToFile()

bool UVaRestJsonObject::WriteToFile ( const FString & Path) const

Save json to file

Definition at line 673 of file VaRestJsonObject.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ WriteToFilePath()

bool UVaRestJsonObject::WriteToFilePath ( const FString & Path,
const bool bIsRelativeToProjectDir = true )
BlueprintCallable

UFUNCTION(BlueprintCallable, Category = "VaRest|Json")

Blueprint Save json to filepath

Parameters
bIsRelativeToProjectDirIf set to 'false' path is treated as absolute

Definition at line 722 of file VaRestJsonObject.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ JsonObj

TSharedRef<FJsonObject> UVaRestJsonObject::JsonObj
private

Internal JSON data

Definition at line 399 of file VaRestJsonObject.h.


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