Hi all! Quick question: If I'm creating a custom...
# klaxon
a
Hi all! Quick question: If I'm creating a custom type that uses polymorphic classes, what should the parseJson() method on the custom type converter look like? My instinct would be to delegate the call to the klaxon instance, but that gives a StackOverflowError, which makes sense. Some context, in case it's helpful: I'm in the process of updating from klaxon 5.0.1 to the latest version. In 5.0 I was using field converters in the cases where I needed them, and then delegating to my klaxon instance to parse in those cases. However, in 5.1, this appears to break. I have a class Getter<T>, which can have other Getters as properties. A Getter has a get() method that calculates and returns a value based on the values returned by its component Getters. I have a number of subclasses of Getter, and I determine which to parse it as using class polymorphism. The issue comes from trying to parse a getter with another getter as a property, as when I do so I get an error saying that the parser doesn't know how to parse the object.