UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
JsonObjectGraphConventions.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5// Private conventions of the JsonObjectGraph object representation - these
6// would be shared between 'from' and 'to' implementations - if you update
7// these make sure to update the tchar version as well if present. TCHAR
8// versions exist because the underlying JSON writer/reader I'm using
9// speaks it 'natively', long term I'm hoping to remove all TCHAR.
10
11// 'Package' level conventions, these are used at the root level:
12#define UE_JSON_ROOT_OBJECTS_KEY_TCHAR TEXT("__RootObjects")
13
14#define UE_JSON_PACKAGE_SUMMARY_KEY_TCHAR TEXT("__PackageSummary")
15
16#define UE_JSON_CUSTOM_VERSIONS_KEY_TCHAR TEXT("__CustomVersions")
17#define UE_JSON_PACKAGE_NAME_KEY_TCHAR TEXT("__PackageName")
18
19// UObject instance conventions:
20#define UE_JSON_OBJECT_INSTANCE_KEY_TCHAR TEXT("__UObject")
21#define UE_JSON_OBJECT_NAME_KEY_TCHAR TEXT("Name")
22#define UE_JSON_OBJECT_CLASS_KEY_TCHAR TEXT("Class")
23#define UE_JSON_OBJECT_FLAGS_KEY_TCHAR TEXT("Flags")
24#define UE_JSON_OBJECT_STRUCTURED_DATA_KEY_TCHAR TEXT("__StructuredData")
25#define UE_JSON_OBJECT_SERIAL_DATA_KEY_TCHAR TEXT("__SerialData")
26#define UE_JSON_OBJECT_SPARSE_CLASS_DATA_KEY_TCHAR TEXT("__SparseClassData")
27#define UE_JSON_OBJECT_INDIRECTLY_REFERENCED_KEY_TCHAR TEXT("__IndirectlyReferenced")
28#define UE_JSON_SCRIPTSTRUCT_TCHAR TEXT("__UScriptStruct")
29#define UE_JSON_PROPERTYBAG_TCHAR TEXT("__UPropertyBag")
30#define UE_JSON_PROPERTYDESCS_TCHAR TEXT("PropertyDescs")
31
32// Reference encoding related conventions:
33#define UE_JSON_OBJECT_REF_PREFIX "uobject:"
34#define UE_JSON_FIELD_REF_PREFIX "ffield:"
35#define UE_JSON_REF_NONE "None"
36
37// Conventions related to encoding generic intrinsic types (TMap and TOptional):
38#define UE_JSON_TMAP_KEY_KEY_TCHAR TEXT("Key")
39#define UE_JSON_TMAP_VALUE_KEY_TCHAR TEXT("Value")
40#define UE_JSON_OPTIONAL_VALUE_KEY_TCHAR TEXT("OptionalValue")