Java is terrible.


Jackson is a java library for (de)serializing json.

If you create a JsonDeserializer subclass that is an inner class of another class (like below), you need to mark that inner class as static, or else you’ll get a $CLASS has no default (no arg) constructor error.

public class Foo {
    public static class FooDeserializer extends JsonDeserializer<Foo> {
        public Foo deserialize(JsonParser parser, DeserializationContext ctx) throws IOException {
            return null;

Last updated: 2019-08-06 11:06:40 -0700