UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
JsonObjectWrapper.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
6#include "CoreMinimal.h"
7#include "HAL/Platform.h"
9#include "UObject/Class.h"
10#include "UObject/Object.h"
13
14#include "JsonObjectWrapper.generated.h"
15
16class FArchive;
17class FJsonObject;
18class FOutputDevice;
19
21USTRUCT(BlueprintType, meta = (DisplayName = "JsonObject"))
23{
25
26public:
28
29 UPROPERTY(EditAnywhere, Category = "JSON")
30 FString JsonString;
31
33
34 JSONUTILITIES_API bool ImportTextItem(const TCHAR*& Buffer, int32 PortFlags, UObject* Parent, FOutputDevice* ErrorText);
35 JSONUTILITIES_API bool ExportTextItem(FString& ValueStr, FJsonObjectWrapper const& DefaultValue, UObject* Parent, int32 PortFlags, UObject* ExportRootScope) const;
36 JSONUTILITIES_API void PostSerialize(const FArchive& Ar);
37
38 JSONUTILITIES_API explicit operator bool() const;
39
40 JSONUTILITIES_API bool JsonObjectToString(FString& Str) const;
41 JSONUTILITIES_API bool JsonObjectFromString(const FString& Str);
42
46 JSONUTILITIES_API SIZE_T GetAllocatedSize() const;
47};
48
51{
52 enum
53 {
54 WithImportTextItem = true,
55 WithExportTextItem = true,
56 WithPostSerialize = true,
57 };
58};
59UCLASS()
FPlatformTypes::SIZE_T SIZE_T
An unsigned integer the same size as a pointer, the same as UPTRINT.
Definition Platform.h:1150
FPlatformTypes::TCHAR TCHAR
Either ANSICHAR or WIDECHAR, depending on whether the platform supports wide characters or the requir...
Definition Platform.h:1135
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
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_BODY(...)
Definition ObjectMacros.h:765
#define UCLASS(...)
Definition ObjectMacros.h:776
#define USTRUCT(...)
Definition ObjectMacros.h:746
#define GENERATED_USTRUCT_BODY(...)
Definition ObjectMacros.h:767
Definition Archive.h:1208
Definition JsonObject.h:23
Definition OutputDevice.h:133
Definition SharedPointer.h:692
Definition JsonObjectWrapper.h:61
Definition Object.h:95
Definition JsonObjectWrapper.h:23
Definition StructOpsTypeTraits.h:11
Definition StructOpsTypeTraits.h:46