FJsonValue

A Json Value is a structure that can be any of the Json Types.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Json

Header

/Engine/Source/Runtime/Json/Public/Dom/JsonValue.h

Include

#include "Dom/JsonValue.h"

Syntax

class FJsonValue

Remarks

A Json Value is a structure that can be any of the Json Types. It should never be used on its, only its derived types should be used.

Variables

Name Description

Public variable

EJson

 

Type

Constructors

Name Description

Protected function

FJsonValue()

Destructors

Name Description

Protected function Virtual

~FJsonValue()

Functions

Name Description

Public function

void

 

AsArgumentType

(
    TSharedPtr< FJsonObject >& Value
)

Public function

void

 

AsArgumentType

(
    TArray< TSharedPtr< FJsonValue > > ...
)

Public function

void

 

AsArgumentType

(
    bool& Value
)

Public function

void

 

AsArgumentType

(
    FString& Value
)

Public function

void

 

AsArgumentType

(
    double& Value
)

Get a field of the same type as the argument

Public function Const

const TArray...

 

AsArray()

Returns this value as an array, logging an error and returning an empty array reference if not possible

Public function Const

bool

 

AsBool()

Returns this value as a boolean, logging an error and returning false if not possible

Public function Const

double

 

AsNumber()

Returns this value as a double, logging an error and returning zero if this is not an Json Number

Public function Virtual Const

const TShare...

 

AsObject()

Returns this value as an object, throwing an error if this is not an Json Object

Public function Const

FString

 

AsString()

Returns this value as a string, logging an error and returning an empty string if not possible

Public function Static

bool

 

CompareEqual

(
    const FJsonValue& Lhs,
    const FJsonValue& Rhs
)

Protected function Const

void

 

ErrorMessage

(
    const FString& InType
)

Protected function Const

FString

 

GetType()

Public function Const

bool

 

IsNull()

Returns true if this value is a 'null'

Public function Virtual Const

bool

 

TryGetArray

(
    const TArray< TSharedPtr< FJsonValu...
)

Tries to convert this value to an array, returning false if not possible

Public function Virtual Const

bool

 

TryGetBool

(
    bool& OutBool
)

Tries to convert this value to a bool, returning false if not possible

Public function Virtual Const

bool

 

TryGetNumber

(
    uint16& OutNumber
)

Tries to convert this value to a number, returning false if not possible

Public function Virtual Const

bool

 

TryGetNumber

(
    int32& OutNumber
)

Tries to convert this value to a number, returning false if not possible

Public function Virtual Const

bool

 

TryGetNumber

(
    int64& OutNumber
)

Tries to convert this value to a number, returning false if not possible

Public function Virtual Const

bool

 

TryGetNumber

(
    uint8& OutNumber
)

Tries to convert this value to a number, returning false if not possible

Public function Virtual Const

bool

 

TryGetNumber

(
    int16& OutNumber
)

Tries to convert this value to a number, returning false if not possible

Public function Virtual Const

bool

 

TryGetNumber

(
    uint64& OutNumber
)

Tries to convert this value to a number, returning false if not possible

Public function Virtual Const

bool

 

TryGetNumber

(
    float& OutNumber
)

Tries to convert this value to a number, returning false if not possible

Public function Virtual Const

bool

 

TryGetNumber

(
    double& OutNumber
)

Tries to convert this value to a number, returning false if not possible

Public function Virtual Const

bool

 

TryGetNumber

(
    uint32& OutNumber
)

Tries to convert this value to a number, returning false if not possible

Public function Virtual Const

bool

 

TryGetNumber

(
    int8& OutNumber
)

Tries to convert this value to a number, returning false if not possible

Public function Virtual Const

bool

 

TryGetObject

(
    const TSharedPtr< FJsonObject >...
)

Tries to convert this value to an object, returning false if not possible

Public function Virtual Const

bool

 

TryGetString

(
    FString& OutString
)

Tries to convert this value to a string, returning false if not possible

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss