Navigation
API > API/Runtime > API/Runtime/Json > API/Runtime/Json/JsonUtils
References
| Module | Json |
| Header | /Engine/Source/Runtime/Json/Public/JsonUtils/JsonPointer.h |
| Include | #include "JsonUtils/JsonPointer.h" |
Syntax
class FJsonPointer
Remarks
JSON Pointer defines a string syntax for identifying a specific value within a JavaScript Object Notation (JSON) document (from rfc6901).
Array append ("-") is currently unsupported.
Constructors
| Type | Name | Description | |
|---|---|---|---|
FJsonPointer () |
|||
FJsonPointer
(
FStringView Path |
|||
FJsonPointer
(
const FJsonPointer& Other |
|||
FJsonPointer
(
FJsonPointer&& Other |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | Append
(
FStringView Part |
Appends the given part to the path | |
| FString | EscapePart
(
const FString& Part |
Substitutes characters in the provided Part with their escaped counterparts (as per the spec). | |
| const TArray< FString > & | GetAll () |
Get the path parts as an array. | |
| FJsonPointer | GetSubPath
(
int32 NumParts |
Gets the sub-path up to the given part length. | |
| bool | IsValid () |
Checks that the path has one or more parts. | |
| int32 | Length () |
The number of parts in the path. | |
| void | SetArrayIndex
(
int32 Index |
Sets the last path part to the given array index. | |
| FString | ToString () |
Get the JsonPointer's string representation. | |
| bool | TryGet
(
const TSharedPtr< FJsonValue >& RootValue, |
Attempt to retrieve the value specified by this Json Pointer from the provided JsonObject. | |
| bool | TryGet
(
const TSharedPtr< FJsonObject >& RootObject, |
Attempt to retrieve the value specified by this Json Pointer from the provided JsonValue. | |
| bool | TryGet
(
const TArray< TSharedPtr< FJsonValue >>& RootValues, |
Attempt to retrieve the value specified by this Json Pointer from the provided Json Array. | |
| FString | UnescapePart
(
const FString& Part |
Substitutes escaped characters in the Provided path with their original character (as per the spec). |
Operators
| Type | Name | Description | |
|---|---|---|---|
| const FString & | operator[]
(
int32 Idx |
Get the path part at the given index. |