I have been developing a plugin and would like to add JSON functionality into it. I am able to use the FJsonObject, etc. on the project level but not on the plugin level.
I can see the JsonObject.h, JsonSerializer.h, etc. in the ExternalDependencies of the Solution in SolutionExplorer for the project, but this doesn’t allow me to use it in a plugin. This makes sense but is there a way to get the same sort of thing into the plugin?
I can also see the Json and JsonUtilities in the PrivateDependencies when I use it in the project but trying to add that to a plugin doesn’t seem to work. Is there a way to get this to work?
Do you have a snippet of your Build.cs file and the #inlclude you are using for JSON? Also, I had an issue where builds weren’t showing new content properly so try to add the PrivateDependencies again (if you removed them) and then close the project and IDE and generate your solution files again. Then run a build from your IDE and then open the project again.
The error I am getting is that I have an unresolved external symbol (LNK2019).
If I remove the “Json” and “JsonUtilities” from the plugin’s Build.cs I get many more errors due to the JSON code not knowing what to do. So it seems to be a linking issue, but I am not sure how to add that into the plugin itself.
Went back and recreated the plugin to see what the difference was. Once I added that back in I was able to build successfully. So the way I have the “Json” and “JsonUtilities” in the Build.cs was just fine, it was just this issue that caused the LNK2019 issue, I believe.