RealDocs

UDataTableFunctionLibrary::FillDataTableFromJSONString

function Engine Blueprint Since unknown
#include "Kismet/DataTableFunctionLibrary.h"
Access: public Specifiers: staticBlueprintCallable

Description

Empties DataTable and repopulates it by parsing JSONString as JSON row data, optionally forcing a specific row struct for the import.

Caveats & Gotchas

  • Editor-only (#if WITH_EDITOR); not available in packaged/runtime builds.
  • Expects the same JSON shape UE produces when exporting a DataTable to JSON (an array of objects keyed by row name); hand-written JSON that doesn't match this shape will fail to import.

Signature

static bool FillDataTableFromJSONString(UDataTable* DataTable, const FString& JSONString, UScriptStruct* ImportRowStruct = nullptr);

Parameters

Name Type Description Default
DataTable UDataTable* The table to empty and repopulate.
JSONString const FString& JSON text to parse as the table's new contents.
ImportRowStruct UScriptStruct* Optional row struct to force for the import; also makes the import fully automated with no dialogs. nullptr

Return Type

bool

Example

Import JSON text into a table C++
const FString JSON = TEXT("[{\"Name\":\"Rifle\",\"Damage\":25,\"FireRate\":0.1}]");
UDataTableFunctionLibrary::FillDataTableFromJSONString(MyDataTable, JSON, FWeaponStatsRow::StaticStruct());

Version History

Introduced in: unknown

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.