Skip to content
Media 0 for listing Json to Struct and Json or Csv to datatable

Description

Get a Json or CSV string from a file or network or anywhere, read it into a DataTable at runtime, and then convert the content into a matching structure.The values in the structure can be all data types supported by the Unreal system.

V2 version of Json and Struct conversion function has fixed these problems, but if it is converted to DataTable, still need to pay attention.

Json or CSV data needs a matching structure.(The field name must not be "Name" or a system reserved name)

Please avoid spaces in the field names, because after the project is packaged, the spaces in the field names will be modified in the Unreal system.

As a result, the fields with spaces cannot be parsed correctly after the project is packaged. This issue was raised by "CedkM" and Test it out together.

Open the Content Browser window, in the upper right corner of the Content Browser, click the Settings button, This will open a menu where you can adjust various settings for the current instance of the Content Browser, Under the View category, check the Show Plugin Content option, Find the Json to Struct and Json or Csv to datatable->Content->Json to Struct and Json or Csv to datatable directory, There are sample levels and related assets inside.

Change log : (2021/12)

Add function "UrlEncode", Returns a percent-encoded version of the passed in string.

Add function "StructToJsonObjectStringV2";

Add function "StructArrayToJsonObjectStringV2";

Increase the function "JsonStringToStructV2";

Add function "JsonStringToStructArrayV2";

These new Json and Struct conversion functions fix several problems in the old version:

1. Now you can use the keyword "name",

2. Now it is possible that the Json and Struct fields are not completely matched, and the redundant missing and wrong fields will be ignored.

Change log : (2021/11)

Added function "CreateDataTable". Support to create an empty DataTable.

Added function "ClearDataTable". Support to clear a DataTable.

Change log : (2021/09)

Support 4.27 version

Added function "AddDataTableRow". Supports adding a row of data to the DataTable at runtime, and modifying this data if the name already exists.

Added function "RemoveDataTableRow". Support to remove a row of data for DataTable at runtime.

Added function "JsonStringToStructArray". Support converting Json data into structure array.

Added function "StructArrayToJsonObjectString". Support converting structure arrays into Json data.

Change log : (2020/12)

Support 4.26 version

Change log : (2020/07)

Support 4.22 version

Version 4.21 is supported, but it cannot be uploaded due to Unreal Market rules. Please contact me if you need it.

Add the EncodingOptions parameter of the SaveStringToFile function to select the encoding format for file storage. (Guess: It was found that the parameter was judged incorrectly in the UE code system during the test, and the UTF8 and UTF8BOM options are opposite to the actual ones)

Change log : (2020/05)

Support 4.25 version

Change log : (2020/04)

Fix bug of nested structure field name.

Added function save strings to a file. (.json | .csv | .*)

Fixed user feedback error when packaging IOS.

Support 4.23 version

Change log : (2020/03)

Can easily copy the output directly to the clipboard

Add function CopyMessageToClipboard;

Add function PasteMessageFromClipboard;

Added Parse JSON string into a struct function.

Included formats

  • logo of Unreal Engine format