clarencen/lshift — Issue #307: Investigate Polymorphism In Jackson With Scala
Author: clarencen
Created: 2011-11-14 22:42:27+00:00
State: open

As part of #156, the CategoryDescriptor hierarchy was implemented in Java because there didn't seem to be a way to get this to work in Scala. Having said that, having this code in Java is highly undesirable. Furthermore, there are moves afoot in the community to improve Scala support with Jackson, so it may be a case that somebody else will fix this issue for us. However it may also be the case that we can find ancillary annotations for Scala types that correct the compiled code so that Jackson plays nicely.

As a further point, the fields of the Java classes were (unconventionally) declared as public, so that we wouldn't have to use Java style getters in the consuming Scala code.

Also - in the original Scala code, a CategoryDescriptor could deliver a default constraint for itself - this code was taken out because it would introduce a circular dependency between the Java and Scala code.