![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <JsonObjectArrayUpdater.h>
Public Member Functions | |
| DECLARE_DELEGATE_RetVal_OneParam (KeyType, FGetElementKey, const ElementType &) | |
| DECLARE_DELEGATE_RetVal_TwoParams (bool, FTryGetJsonObjectKey, const FJsonObject &, KeyType &) | |
| DECLARE_DELEGATE_TwoParams (FUpdateJsonObject, const ElementType &, FJsonObject &) | |
| DECLARE_DELEGATE_OneParam (FSortArray, TArray< TSharedPtr< FJsonValue > > &) | |
Static Public Member Functions | |
| static void | Execute (FJsonObject &JsonObject, const FString &ArrayName, const TArray< ElementType > &SourceArray, FGetElementKey GetElementKey, FTryGetJsonObjectKey TryGetJsonObjectKey, FUpdateJsonObject UpdateJsonObject, FSortArray SortJsonArray=FSortArray()) |
Utility to update an array of json objects from an array of elements (of arbitrary type). Elements in the source array and the destination json object array are matched based on an arbitrary key (provided by the FGetElementKey and FTryGetJsonObjectKey delegates respectively). Existing elements get "updated" via the FUpdateJsonObject delegate. The update scheme is entirely customizable; for example, it can be non-destructive and leave some json fields unchanged. Elements from the source array that are not in the json array (based on the "key") are added to it. Elements that are not present in the source array (based on the "key") are removed from the json array. If the source array is empty the json array field is removed.
| FJsonObjectArrayUpdater< ElementType, KeyType >::DECLARE_DELEGATE_OneParam | ( | FSortArray | , |
| TArray< TSharedPtr< FJsonValue > > & | |||
| ) |
| FJsonObjectArrayUpdater< ElementType, KeyType >::DECLARE_DELEGATE_RetVal_OneParam | ( | KeyType | , |
| FGetElementKey | , | ||
| const ElementType & | |||
| ) |
| FJsonObjectArrayUpdater< ElementType, KeyType >::DECLARE_DELEGATE_RetVal_TwoParams | ( | bool | , |
| FTryGetJsonObjectKey | , | ||
| const FJsonObject & | , | ||
| KeyType & | |||
| ) |
| FJsonObjectArrayUpdater< ElementType, KeyType >::DECLARE_DELEGATE_TwoParams | ( | FUpdateJsonObject | , |
| const ElementType & | , | ||
| FJsonObject & | |||
| ) |
|
inlinestatic |