FJsonObjectArrayUpdater

Utility to update an array of json objects from an array of elements (of arbitrary type).

Windows
MacOS
Linux

References

Module

Json

Header

/Engine/Source/Runtime/Json/Public/JsonUtils/JsonObjectArrayUpdater.h

Include

#include "JsonUtils/JsonObjectArrayUpdater.h"

Syntax

template<typename ElementType, typename KeyType>
struct FJsonObjectArrayUpdater

Remarks

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.

Functions

Name Description

Public function Static

void

 

Execute

(
    FJsonObject& JsonObject,
    const FString& ArrayName,
    const TArray< ElementType >& Sourc...,
    FGetElementKey GetElementKey,
    FTryGetJsonObjectKey TryGetJsonObje...,
    FUpdateJsonObject UpdateJsonObject
)

Typedefs

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss