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.
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.
PS:
I changed a bunch of things mainly to accommodate Enums. But this already helped me 80% on the way and fixed my base issue.
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.
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";