转至内容
商品 Struct JSON String-Convert Unreal Engine Structs to and from JSON 的媒体 1
0 条评论

描述

Convert Unreal Engine Structs to and from JSON

Struct JSON String is a lightweight Runtime Code Plugin for converting supported Unreal Engine reflected structs to and from JSON strings through Blueprint or C++.

It is suitable for save data, configuration systems, network payloads, database exchange, debugging tools, structured AI responses, and other workflows that require reliable communication between Unreal structs and JSON.

Documentation

Installation instructions, Blueprint and C++ examples, node parameters, quick-start testing, supported behavior, troubleshooting, and known limitations are available here:

https://github.com/givecode/StructJsonString

Support

For bug reports, usage questions, and feature requests, please submit an issue here:

https://github.com/givecode/StructJsonString/issues

Main Features

  • Convert custom Blueprint and C++ structs to JSON strings.

  • Deserialize JSON into a connected Blueprint struct.

  • Return both the target struct and an FInstancedStruct.

  • Convert valid FInstancedStruct values to JSON.

  • Support nested structs, arrays, sets, and maps.

  • Support Blueprint User Defined Structs.

  • Preserve authored field names for C++ structs and Blueprint structs.

  • Prevent internal Blueprint property GUIDs from appearing in exported JSON field names.

  • Ignore matching fields by name at any nesting level.

  • Ignore individual fields using dot-separated JSON paths.

  • Generate pretty-formatted or condensed JSON.

  • Return success states and detailed error messages from wildcard conversion nodes.

  • Support partial JSON deserialization.

  • Preserve destination values when corresponding JSON fields are missing or null.

  • Ignore unknown JSON fields when other valid fields match the target struct.

  • Automatically skip transient and deprecated properties.

  • Work at runtime, including packaged applications.

  • Include full C++ source code.

Blueprint Support

The plugin provides the following Blueprint nodes:

  • Convert Struct to JSON String

  • Convert Struct to JSON String (Ignore by Name)

  • Convert Struct to JSON String (Ignore by Path)

  • Convert JSON String to Instanced Struct and Any Struct

  • Convert JSON String to Instanced Struct and Any Struct V2

  • Convert Instanced Struct to JSON String

Wildcard struct pins allow the conversion nodes to work with supported custom Blueprint structs without requiring a separate node for every struct type.

The JSON deserialization nodes output:

  • A wildcard struct using the type connected to Out Struct

  • An FInstancedStruct containing the same converted value

  • A success result

  • A detailed error message if conversion fails

C++ Support

The plugin provides templated C++ helpers:

  • UStructStringLibrary::StructToJsonString

  • UStructStringLibrary::JsonStringToStruct

It also provides:

  • UStructStringLibrary::InstancedStructToJsonString

The C++ deserialization helper updates matching fields while preserving the current values of destination fields that are missing or null in the JSON input.

Supported Data Types

The plugin supports common Unreal Engine reflected property types, including:

  • Boolean values

  • Integer and floating-point values

  • Strings, names, and text

  • Enumerations

  • Nested structs

  • Arrays

  • Sets

  • Maps

  • FInstancedStruct

  • Blueprint User Defined Structs

Support for an individual property ultimately depends on Unreal Engine’s reflected property and JSON conversion support.

Common Use Cases

  • Save and load data serialization

  • REST and HTTP request or response payloads

  • Database data exchange

  • Runtime configuration

  • Debugging and logging

  • Structured LLM and AI responses

  • External service integration

  • Blueprint data inspection

  • Communication between gameplay and backend systems

Important Notes

This plugin converts Unreal Engine structs and JSON strings. It does not directly:

  • Send HTTP requests

  • Connect to databases

  • Read or write files

  • Communicate with external services

These operations can be implemented separately using the JSON strings generated or consumed by the plugin.

JSON input must use a JSON object as its root value. Unknown fields are ignored when at least one field matches the target struct. Deserialization fails if a non-empty JSON object contains no fields that match the selected target struct.

Ignore-by-name matching is case-insensitive and applies recursively. Ignore-by-path matching uses exact, case-sensitive, dot-separated JSON field names.

Compatibility

  • Plugin version: 1.4.4

  • Unreal Engine 5.6

  • Unreal Engine 5.7

  • Unreal Engine 5.8

  • Module type: Runtime

  • Supported target platform: Windows 64-bit

Only the engine versions and platforms listed above have been tested.

包含格式