Hi, I'm working on a project where null objects so...
# serialization
d
Hi, I'm working on a project where null objects sometimes are being returned as [ ]. Serializer expects an object but there's an array in its place in json. Is there a way to deal with incorrect types?
d
Thanks! This seems to be the way to go, but I would need to create it as a serializer that I can include in SerializersModule, so that it can be applied to all fields automatically (the api is not consistent so I don't know where I can expect [] instead of null). I don't know how to make it work with Any, there is a specific serializer that I need to pass to JsonTransformingSerializer constructor 🤯