A Demo Project for the UnrealEngineSDK
|
UCLASS(BlueprintType, Blueprintable) More...
#include <VaRestJsonObject.h>
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< bool > | GetBoolArrayField (const FString &FieldName) const |
UFUNCTION(BlueprintCallable, Category = "VaRest|Json") | |
bool | GetBoolField (const FString &FieldName) const |
UFUNCTION(BlueprintCallable, Category = "VaRest|Json") | |
UVaRestJsonValue * | GetField (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") | |
UVaRestJsonObject * | GetObjectField (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< FJsonObject > | JsonObj |
UCLASS(BlueprintType, Blueprintable)
Blueprintable FJsonObject wrapper
Definition at line 22 of file VaRestJsonObject.h.
void UVaRestJsonObject::DecodeFromArchive | ( | TUniquePtr< FArchive > & | Reader | ) |
Deserialize byte stream from reader
Definition at line 611 of file VaRestJsonObject.cpp.
|
BlueprintCallable |
UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
Construct Json object from string
Definition at line 64 of file VaRestJsonObject.cpp.
int32 UVaRestJsonObject::DeserializeFromTCHARBytes | ( | const TCHAR * | Bytes, |
int32 | Size ) |
Deserialize byte content to json
Definition at line 594 of file VaRestJsonObject.cpp.
Deserialize byte content to json
Definition at line 571 of file VaRestJsonObject.cpp.
|
BlueprintCallable |
UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
Serialize Json to string (formatted with line breaks)
Definition at line 46 of file VaRestJsonObject.cpp.
|
BlueprintCallable |
UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
Serialize Json to string (single string without line breaks)
Definition at line 55 of file VaRestJsonObject.cpp.
|
private |
|
BlueprintCallable |
UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
Get the field named FieldName as a Json Array
Definition at line 263 of file VaRestJsonObject.cpp.
|
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.
UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
Get the field named FieldName as a boolean.
Definition at line 242 of file VaRestJsonObject.cpp.
|
BlueprintCallable |
UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
Get the field named FieldName as a JsonValue
Definition at line 126 of file VaRestJsonObject.cpp.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
BlueprintCallable |
UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
Get the field named FieldName as a Json object.
Definition at line 360 of file VaRestJsonObject.cpp.
TSharedRef< FJsonObject > & UVaRestJsonObject::GetRootObject | ( | ) |
Get the root Json object
Definition at line 25 of file VaRestJsonObject.cpp.
|
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.
|
BlueprintCallable |
UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
Get the field named FieldName as a string.
Definition at line 221 of file VaRestJsonObject.cpp.
|
inlineprivate |
Internal implementation to get number arrays of different types
Definition at line 268 of file VaRestJsonObject.h.
UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
Checks to see if the FieldName exists in the object
Definition at line 106 of file VaRestJsonObject.cpp.
|
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.
UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
Remove field named FieldName
Definition at line 116 of file VaRestJsonObject.cpp.
|
BlueprintCallable |
UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
Reset all internal data
Definition at line 20 of file VaRestJsonObject.cpp.
|
BlueprintCallable |
UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
Set an ObjectField named FieldName and value of Json Array
Definition at line 289 of file VaRestJsonObject.cpp.
|
BlueprintCallable |
UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
Set an ObjectField named FieldName and value of Bool Array
Definition at line 508 of file VaRestJsonObject.cpp.
UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
Set a boolean field named FieldName and value of InValue
Definition at line 253 of file VaRestJsonObject.cpp.
|
BlueprintCallable |
UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
Add a field named FieldName with a Value
Definition at line 145 of file VaRestJsonObject.cpp.
UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
Add a field named FieldName with Int64 as value.
Definition at line 211 of file VaRestJsonObject.cpp.
|
BlueprintCallable |
UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
Add a field named FieldName with Integer as value.
Definition at line 190 of file VaRestJsonObject.cpp.
UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
Set a map of fields with bool values
Definition at line 409 of file VaRestJsonObject.cpp.
|
inlineprivate |
Internal implementation for setting map fields.
Definition at line 250 of file VaRestJsonObject.h.
|
BlueprintCallable |
UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
Set a map of fields with int32 values
Definition at line 399 of file VaRestJsonObject.cpp.
|
BlueprintCallable |
UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
Set a map of fields with int64 values
Definition at line 404 of file VaRestJsonObject.cpp.
|
BlueprintCallable |
UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
Set a map of fields with String values
Definition at line 386 of file VaRestJsonObject.cpp.
|
BlueprintCallable |
UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
Set a map of fields with uint8 values
Definition at line 394 of file VaRestJsonObject.cpp.
|
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.
|
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.
|
BlueprintCallable |
UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
Set an ObjectField named FieldName and value of Ob Array
Definition at line 552 of file VaRestJsonObject.cpp.
|
BlueprintCallable |
UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
Set an ObjectField named FieldName and value of JsonObject
Definition at line 376 of file VaRestJsonObject.cpp.
void UVaRestJsonObject::SetRootObject | ( | const TSharedPtr< FJsonObject > & | JsonObject | ) |
Set the root Json object
Definition at line 30 of file VaRestJsonObject.cpp.
|
BlueprintCallable |
UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
Set an ObjectField named FieldName and value of String Array
Definition at line 468 of file VaRestJsonObject.cpp.
|
BlueprintCallable |
UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
Add a field named FieldName with value of StringValue
Definition at line 232 of file VaRestJsonObject.cpp.
|
static |
Definition at line 727 of file VaRestJsonObject.cpp.
Save json to file
Definition at line 673 of file VaRestJsonObject.cpp.
|
BlueprintCallable |
UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
Blueprint Save json to filepath
bIsRelativeToProjectDir | If set to 'false' path is treated as absolute |
Definition at line 722 of file VaRestJsonObject.cpp.
|
private |
Internal JSON data
Definition at line 399 of file VaRestJsonObject.h.