Easy way to work with JSON with C++

Hi guys, i maked little tool which can optimize your work with json, as you know write by hands structures for json is annoying, it’s repeatable boring work. I was trying automize it. I made it as online tool by url https://json2ue4.com.

I hope you will enjoy it.
This tool generate structures by example json with serialization. I planing also making deserialization if this will be in demand.
You can ask me or give me some feedback here. If you find some issues you also can tell me about it here.


Cool tool, thanks for sharing :slight_smile:

Thats neat, Thx !

This is great!!

I looked forever to find out why I could not load a JSON into a UStruct until I found your solution!

It appeared I just had a small syntax issue with the JSON, but it did not warn me at all in the code. Using your system, I could perfectly load it into Unreal.

I changed a bunch of things mainly to accommodate Enums. But this already helped me 80% on the way and fixed my base issue.

Congrats! You saved my day :slight_smile:

How do you handle enums ?

At now, it not. I’ll make this feature until the end of the current year, i hope.

Expected logic: Analyzer will find repeatable values for json string fields in arrays. If any value repeated more than 2 times and count of all unique strings less then N(this will be custimizable) times then it will generate enums.

If you have better solution, please tell me.

I was more talking about String (.json) to Enum (unreal) conversion.
I guess for a clean way to detect whats an enum you would need to switch to a validation template or so.

What would also be nice to have a switch to use the Values of the .json as Defaults.

 UPROPERTY(EditAnywhere, BlueprintReadWrite)
 FString name = "John";

I am not really understand what did you mean. Give me example, what json you have, and what output you want to get.

Yes, thx good idea. Will make it.

Pin this! asd

This is such a great tool. Thank you!
Life saver.

Domain now at json2ue.com