FOnlineJsonSerializable with USTRUCT fail to parse

Unfortunately the UnrealHeaderTool is unable to parse an USTRUCT deriving from FOnlineJsonSerializable

USTRUCT(BlueprintType)
struct FKInventoryItem : 
	public FOnlineJsonSerializable
{
.....

}

Is there a plan to fix this problem ?

D.

Hey ,

Thanks for the report but the way that FOnlineJsonSerializable is setup means that it wasn’t meant to be exposed to the game framework, such as in a USTRUCT( ). Because of this, this is not a bug.

However, I have submitted a feature request to expose this to the game frame work. You can follow it here:

https://issues.unrealengine.com/issue/UE-37671

FJsonSerializable is specifically for non-USTRUCTS. If you want to serialize a USTRUCT to json, take a look at JsonObjectConverter.h, UStructToJsonObject or similar functions will do what you want.

Thank you very much for your answer.
I will use JsonObjectConverter.

D.