PAPER2FPaperJSONHelpers

Windows
MacOS
Linux

References

Module

Paper2DEditor

Header

/Engine/Plugins/2D/Paper2D/Source/Paper2DEditor/Public/PaperJSONHelpers.h

Include

#include "PaperJSONHelpers.h"

Syntax

class PAPER2FPaperJSONHelpers

Functions

Name Description

Public function Static

const TArray...

 

ReadArray

(
    TSharedPtr< class FJsonObject > Ite...,
    const FString& Key
)

Returns the array named Key or nullptr if it is missing or the wrong type.

Public function Static

bool

 

ReadBoolean

(
    const TSharedPtr< class FJsonObject...,
    const FString& Key,
    bool bDefaultIfMissing
)

Returns the bool named Key or bDefaultIfMissing if it is missing or the wrong type (note: no way to determine errors!)

Public function Static

bool

 

ReadFloatNoDefault

(
    const TSharedPtr< class FJsonObject...,
    const FString& Key,
    float& Out_Value
)

Returns true if the field named Key is a Number, populating Out_Value, or false if it is missing or the wrong type (Out_Value is set to 0.0f on failure)

Public function Static

bool

 

ReadIntegerNoDefault

(
    const TSharedPtr< class FJsonObject...,
    const FString& Key,
    int32& Out_Value
)

Returns true if the field named Key is a Number (truncating it to an integer), populating Out_Value, or false if it is missing or the wrong type (Out_Value is set to 0 on failure)

Public function Static

bool

 

ReadIntPoint

(
    const TSharedPtr< class FJsonObject...,
    const FString& Key,
    FIntPoint& Out_XY
)

Returns true if the object named Key is a struct containing two floats (x,y), populating XY with the values)

Public function Static

TSharedPtr< ...

 

ReadObject

(
    TSharedPtr< class FJsonObject > Ite...,
    const FString& Key
)

Returns the object named Key or nullptr if it is missing or the wrong type.

Public function Static

bool

 

ReadRectangle

(
    const TSharedPtr< class FJsonObject...,
    const FString& Key,
    FIntPoint& Out_XY,
    FIntPoint& Out_WH
)

Returns true if the object named Key is a struct containing four integers (x,y,w,h), populating XY and WH with the values)

Public function Static

bool

 

ReadSize

(
    const TSharedPtr< class FJsonObject...,
    const FString& Key,
    FVector2D& Out_WH
)

Returns true if the object named Key is a struct containing two floats (w,h), populating WH with the values)

Public function Static

FString

 

ReadString

(
    TSharedPtr< class FJsonObject > Ite...,
    const FString& Key,
    const FString& DefaultValue
)

Returns the value of Key in Item, or DefaultValue if the Key is missing or the wrong type

Public function Static

bool

 

ReadXY

(
    const TSharedPtr< class FJsonObject...,
    const FString& Key,
    FVector2D& Out_WH
)

Returns true if the object named Key is a struct containing two floats (x,y), populating WH with the values)

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