FJsonObject

A Json Object is a structure holding an unordered set of name/value pairs.

Windows
MacOS
Linux

References

Module

Json

Header

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

Include

#include "Dom/JsonObject.h"

Syntax

class FJsonObject

Remarks

A Json Object is a structure holding an unordered set of name/value pairs. In a Json file, it is represented by everything between curly braces {}.

Variables

Name Description

Public variable

TMap< FString, ...

 

Values

Functions

Name Description

Public function Const

const TArray...

 

GetArrayField

(
    const FString& FieldName
)

Get the field named FieldName as an array.

Public function Const

bool

 

GetBoolField

(
    const FString& FieldName
)

Gets the field with the specified name as a boolean.

Public function Const

TSharedPtr< ...

 

GetField

(
    const FString& FieldName
)

Public function Const

int32

 

GetIntegerField

(
    const FString& FieldName
)

Gets a numeric field and casts to an int32

Public function Const

double

 

GetNumberField

(
    const FString& FieldName
)

Gets the field with the specified name as a number.

Public function Const

const TShare...

 

GetObjectField

(
    const FString& FieldName
)

Gets the field with the specified name as a Json object.

Public function Const

FString

 

GetStringField

(
    const FString& FieldName
)

Get the field named FieldName as a string.

Public function Const

bool

 

HasField

(
    const FString& FieldName
)

Checks whether a field with the specified name exists in the object.

Public function Const

bool

 

HasTypedField

(
    const FString& FieldName
)

Checks whether a field with the specified name and type exists in the object.

Public function

void

 

RemoveField

(
    const FString& FieldName
)

Removes the field with the specified name.

Public function

void

 

SetArrayField

(
    const FString& FieldName,
    const TArray< TSharedPtr< FJsonValu...
)

Set an array field named FieldName and value of Array

Public function

void

 

SetBoolField

(
    const FString& FieldName,
    bool InValue
)

Set a boolean field named FieldName and value of InValue

Public function

void

 

SetField

(
    const FString& FieldName,
    const TSharedPtr< FJsonValue >& Va...
)

Sets the value of the field with the specified name.

Public function

void

 

SetNumberField

(
    const FString& FieldName,
    double Number
)

Add a field named FieldName with Number as value

Public function

void

 

SetObjectField

(
    const FString& FieldName,
    const TSharedPtr< FJsonObject >& J...
)

Set an ObjectField named FieldName and value of JsonObject

Public function

void

 

SetStringField

(
    const FString& FieldName,
    const FString& StringValue
)

Add a field named FieldName with value of StringValue

Public function Const

bool

 

TryGetArrayField

(
    const FString& FieldName,
    const TArray< TSharedPtr< FJsonValu...
)

Try to get the field named FieldName as an array, or return false if it's another type

Public function Const

bool

 

TryGetBoolField

(
    const FString& FieldName,
    bool& OutBool
)

Get the field named FieldName as a string.

Public function Const

bool

 

TryGetEnumArrayField

(
    const FString& FieldName,
    TArray< TEnum >& OutArray
)

Get the field named FieldName as an array of enums.

Public function Const

TSharedPtr< ...

 

TryGetField

(
    const FString& FieldName
)

Attempts to get the field with the specified name.

Public function Const

bool

 

TryGetNumberField

(
    const FString& FieldName,
    double& OutNumber
)

Get the field named FieldName as a number.

Public function Const

bool

 

TryGetNumberField

(
    const FString& FieldName,
    int32& OutNumber
)

Get the field named FieldName as a number, and makes sure it's within int32 range.

Public function Const

bool

 

TryGetNumberField

(
    const FString& FieldName,
    uint32& OutNumber
)

Get the field named FieldName as a number, and makes sure it's within uint32 range.

Public function Const

bool

 

TryGetNumberField

(
    const FString& FieldName,
    int64& OutNumber
)

Get the field named FieldName as a number.

Public function Const

bool

 

TryGetObjectField

(
    const FString& FieldName,
    const TSharedPtr< FJsonObject >...
)

Try to get the field named FieldName as an object, or return false if it's another type

Public function Const

bool

 

TryGetStringArrayField

(
    const FString& FieldName,
    TArray< FString >& OutArray
)

Get the field named FieldName as an array of strings.

Public function Const

bool

 

TryGetStringField

(
    const FString& FieldName,
    FString& OutString
)

Get the field named FieldName as a string.

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