8UVaRestJsonValue::UVaRestJsonValue(
const FObjectInitializer& ObjectInitializer)
9 : Super(ObjectInitializer)
82 return TEXT(
"String");
85 return TEXT(
"Number");
88 return TEXT(
"Boolean");
94 return TEXT(
"Object");
119 return static_cast<float>(
JsonVal->AsNumber());
130 return static_cast<int32
>(
JsonVal->AsNumber());
141 return static_cast<int64
>(
JsonVal->AsNumber());
168 TArray<UVaRestJsonValue*> OutArray;
176 TArray<TSharedPtr<FJsonValue>> ValArray =
JsonVal->AsArray();
177 for (
auto Value : ValArray)
182 OutArray.Add(NewValue);
196 const TSharedPtr<FJsonObject> NewObj =
JsonVal->AsObject();
209 UE_LOG(LogVaRest,
Error, TEXT(
"Json Value of type '%s' used as a '%s'."), *
GetTypeString(), *InType);
EVaJson
UENUM(BlueprintType)
UCLASS(BlueprintType, Blueprintable)
void SetRootObject(const TSharedPtr< FJsonObject > &JsonObject)
UCLASS(BlueprintType, Blueprintable)
TArray< UVaRestJsonValue * > AsArray() const
UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
bool IsNull() const
UFUNCTION(BlueprintPure, Category = "VaRest|Json")
int32 AsInt32() const
UFUNCTION(BlueprintPure, Category = "VaRest|Json")
void Reset()
UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
FString AsString() const
UFUNCTION(BlueprintPure, Category = "VaRest|Json")
int64 AsInt64() const
UFUNCTION(BlueprintPure, Category = "VaRest|Json")
void SetRootValue(TSharedPtr< FJsonValue > &JsonValue)
float AsNumber() const
UFUNCTION(BlueprintPure, Category = "VaRest|Json")
void ErrorMessage(const FString &InType) const
TSharedPtr< FJsonValue > & GetRootValue()
UVaRestJsonObject * AsObject()
UFUNCTION(BlueprintCallable, Category = "VaRest|Json")
bool AsBool() const
UFUNCTION(BlueprintPure, Category = "VaRest|Json")
TSharedPtr< FJsonValue > JsonVal
EVaJson GetType() const
UFUNCTION(BlueprintPure, Category = "VaRest|Json")
FString GetTypeString() const
UFUNCTION(BlueprintPure, Category = "VaRest|Json")