noncom
08/25/2018, 3:10 PMVector3D
class works fine, no problem there.
Transforming an instance of C
into a string works fine.
Transforming the string back into C
gives a problem. That's understanable, and the only solution is to provide a converter that, looking at the value of name
, will resolve the ambiguity and let Klaxon decide if what it is seeing is either an instance of A
or B
. The problem is: at that point I will have to write a converter for Vector3D
too because there is no way to return the job to the standard converter from within fromJson
of the custom one.
Ideally, after I have manually resolved the ambiguity with types, I'd be very glad to just go on with the standard converter because it does fine job for most of the simple classes. But currently, as I see it, I have to implement the whole swarm of converters for all the classes that happen to need deserialization from within the deserialization of the custom one.