I'm trying to De-serialize JSON string I'm getting from a web-service.
When I run the code in the Unity editor everything works fine, but when I make a WebGL build and I run it on a browser I'm getting this error.
Unable to find a constructor to use for type {0}. A class should either have a default constructor, one constructor with arguments or a constructor marked with the JsonConstructor attribute.
I found it in the CreateNewObject method inside the JsonSerializerInternalReader class.
I tried adding the [JsonConstructor] decorator to an empty/default constructor of my classes, but nothing changes.
I'm trying to De-serialize JSON string I'm getting from a web-service. When I run the code in the Unity editor everything works fine, but when I make a WebGL build and I run it on a browser I'm getting this error.
Unable to find a constructor to use for type {0}. A class should either have a default constructor, one constructor with arguments or a constructor marked with the JsonConstructor attribute.
I found it in the CreateNewObject method inside the JsonSerializerInternalReader class. I tried adding the
[JsonConstructor]
decorator to an empty/default constructor of my classes, but nothing changes.