UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::Json::FJsonPointer Class Reference

#include <JsonPointer.h>

Public Member Functions

 FJsonPointer ()=default
 
JSON_API FJsonPointer (FStringView Path)
 
JSON_API FJsonPointer (const FJsonPointer &Other)
 
JSON_API FJsonPointer (FJsonPointer &&Other) noexcept
 
JSON_API bool TryGet (const TSharedPtr< FJsonObject > &RootObject, TSharedPtr< FJsonValue > &OutValue) const
 
JSON_API bool TryGet (const TSharedPtr< FJsonValue > &RootValue, TSharedPtr< FJsonValue > &OutValue) const
 
JSON_API bool TryGet (const TArray< TSharedPtr< FJsonValue > > &RootValues, TSharedPtr< FJsonValue > &OutValue) const
 
bool IsValid () const
 
int32 Length () const
 
JSON_API void Append (FStringView Part)
 
JSON_API void SetArrayIndex (int32 Index)
 
JSON_API FJsonPointer GetSubPath (int32 NumParts) const
 
JSON_API FString ToString () const
 
const FString & operator[] (int32 Idx) const
 
const TArray< FString > & GetAll () const
 

Static Public Member Functions

static JSON_API FString EscapePart (const FString &Part)
 
static JSON_API FString UnescapePart (const FString &Part)
 

Detailed Description

JSON Pointer defines a string syntax for identifying a specific value within a JavaScript Object Notation (JSON) document (from rfc6901).

See also
https://datatracker.ietf.org/doc/html/rfc6901
Note
Array append ("-") is currently unsupported.

Constructor & Destructor Documentation

◆ FJsonPointer() [1/4]

UE::Json::FJsonPointer::FJsonPointer ( )
default

◆ FJsonPointer() [2/4]

UE::Json::FJsonPointer::FJsonPointer ( FStringView  Path)

◆ FJsonPointer() [3/4]

UE::Json::FJsonPointer::FJsonPointer ( const FJsonPointer Other)

◆ FJsonPointer() [4/4]

UE::Json::FJsonPointer::FJsonPointer ( FJsonPointer &&  Other)
noexcept

Member Function Documentation

◆ Append()

void UE::Json::FJsonPointer::Append ( FStringView  Part)

Appends the given part to the path

◆ EscapePart()

FString UE::Json::FJsonPointer::EscapePart ( const FString &  Part)
static

Substitutes characters in the provided Part with their escaped counterparts (as per the spec).

◆ GetAll()

const TArray< FString > & UE::Json::FJsonPointer::GetAll ( ) const
inline

Get the path parts as an array.

◆ GetSubPath()

FJsonPointer UE::Json::FJsonPointer::GetSubPath ( int32  NumParts) const

Gets the sub-path up to the given part length.

◆ IsValid()

bool UE::Json::FJsonPointer::IsValid ( ) const
inline

Checks that the path has one or more parts.

◆ Length()

int32 UE::Json::FJsonPointer::Length ( ) const
inline

The number of parts in the path.

◆ operator[]()

const FString & UE::Json::FJsonPointer::operator[] ( int32  Idx) const
inline

Get the path part at the given index.

◆ SetArrayIndex()

void UE::Json::FJsonPointer::SetArrayIndex ( int32  Index)

Sets the last path part to the given array index.

◆ ToString()

FString UE::Json::FJsonPointer::ToString ( ) const

Get the JsonPointer's string representation.

◆ TryGet() [1/3]

bool UE::Json::FJsonPointer::TryGet ( const TArray< TSharedPtr< FJsonValue > > &  RootValues,
TSharedPtr< FJsonValue > &  OutValue 
) const

Attempt to retrieve the value specified by this Json Pointer from the provided Json Array.

◆ TryGet() [2/3]

bool UE::Json::FJsonPointer::TryGet ( const TSharedPtr< FJsonObject > &  RootObject,
TSharedPtr< FJsonValue > &  OutValue 
) const

Attempt to retrieve the value specified by this Json Pointer from the provided Json Value.

◆ TryGet() [3/3]

bool UE::Json::FJsonPointer::TryGet ( const TSharedPtr< FJsonValue > &  RootValue,
TSharedPtr< FJsonValue > &  OutValue 
) const

Attempt to retrieve the value specified by this Json Pointer from the provided Json Object.

◆ UnescapePart()

FString UE::Json::FJsonPointer::UnescapePart ( const FString &  Part)
static

Substitutes escaped characters in the Provided path with their original character (as per the spec).


The documentation for this class was generated from the following files: