UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
JsonPointer.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "Containers/Array.h"
8#include "CoreMinimal.h"
9#include "Dom/JsonValue.h"
10#include "HAL/Platform.h"
12
13class FJsonObject;
14class FJsonValue;
15
16namespace UE::Json
17{
25 {
26 public:
27 FJsonPointer() = default;
31
34
37
40
42 inline bool IsValid() const
43 {
44 return Length() > 0;
45 }
46
48 inline int32 Length() const
49 {
50 return PathParts.Num();
51 }
52
55
58
61
63 JSON_API FString ToString() const;
64
66 inline const FString& operator[](int32 Idx) const
67 {
68 return PathParts[Idx];
69 }
70
72 inline const TArray<FString>& GetAll() const
73 {
74 return PathParts;
75 }
76
78 static JSON_API FString EscapePart(const FString& Part);
79
81 static JSON_API FString UnescapePart(const FString& Part);
82
83 private:
85 JSON_API bool ParsePath(const FString& InPath);
86
87 private:
88 TArray<FString> PathParts;
89 };
90}
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
Definition JsonObject.h:23
Definition JsonValue.h:22
Definition Array.h:670
UE_REWRITE SizeType Num() const
Definition Array.h:1144
Definition SharedPointer.h:692
Definition JsonPointer.h:25
static JSON_API FString EscapePart(const FString &Part)
Definition JsonPointer.cpp:195
static JSON_API FString UnescapePart(const FString &Part)
Definition JsonPointer.cpp:202
JSON_API FString ToString() const
Definition JsonPointer.cpp:190
JSON_API void SetArrayIndex(int32 Index)
Definition JsonPointer.cpp:164
int32 Length() const
Definition JsonPointer.h:48
JSON_API bool TryGet(const TSharedPtr< FJsonObject > &RootObject, TSharedPtr< FJsonValue > &OutValue) const
Definition JsonPointer.cpp:75
bool IsValid() const
Definition JsonPointer.h:42
JSON_API FJsonPointer GetSubPath(int32 NumParts) const
Definition JsonPointer.cpp:171
const FString & operator[](int32 Idx) const
Definition JsonPointer.h:66
const TArray< FString > & GetAll() const
Definition JsonPointer.h:72
Definition JsonValue.cpp:610
U16 Index
Definition radfft.cpp:71