Open Din-Wan opened 3 years ago
Hello!
My custom converts does not support the different JsonSerializerSettings as I've intentionally not considered them. The UnityEngine.Color
and UnityEngine.Color32
types are structs, and so there should be no use for having $id
references between them.
I'll try to reproduce this and take a closer look, because you should not get an error like that either case.
Hi! I hope I'm posting this in the right place... I am currently having a teeny problem with deserializing some JSON in my project. Originally, my project was using JSON .NET for Unity plugin by ParentElement, and so I have a lot of files which contain JSON that was created using their serializer. They were created with the following settings:
var settings = new JsonSerializerSettings() { PreserveReferencesHandling = PreserveReferencesHandling.Objects };
The object I serialized contained
UnityEngine.Color
and the resulting JSON contained$id
metadata for the Colors. However, when I used your serializer with the converter and the same ReferenceHandling settings,$id
tags are not generated for the Colors. The problem I am having is when I try to deserialize the existing JSON in my project, I get the following error:If it helps, here is the class containing the Color:
I was wondering you might know what's going wrong and of any way of dealing with this issue. Thanks in advance.