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 > >& Value
)

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< TSharedPtr< FJsonValue > > &

 

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 TSharedPtr< FJsonObject > &

 

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< FJsonValue > >*& OutArray
)

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 >*& Object
)

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

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback