opened
patient-zero
username_0
I struggled trying to figure out why I could not override encoding of a java.net.InetAddress, and finally realized that TypeType was recognizing it as SYSTEM, which always uses the unknown serializer, i.e. the toString() method. It would be better to lift this limitation, otherwise types like Java 8 Time representations, InetAddress and lots of other reasonable things to override will need to be wrapped.
system types cannot be overridden with custom serializers
issue
created
RichardHightower
username_1
Ok.. I will consider that. I think I want to handle InetAddress the right way.. not sure what that is yet.

Boon is still in Java 7 land, but I will try to figure out how to support Java 8 Time in Java 7 in a way so you can use Boon with Java 8 even though it is still in Java 7. 

I have been working on QBit a lot lately. I need to come back to Boon and fix some of these things.
comment
created
RichardHightower
username_1
Do you have the code where you attempted to install a custom serializer that failed?
I will use that as the test case.
comment
created
kyle-downey
username_2
If you remove setUseAnnotations(true) it will not work.

        JsonSerializerFactory jsonSerializerFactory = new JsonSerializerFactory()
                .setAsciiOnly(true)
                .setUseAnnotations(true)
                .addTypeSerializer(PasswordHolder.class, new AbstractCustomObjectSerializer<PasswordHolder>(PasswordHolder.class) {
                    @Override
                    public void serializeObject(JsonSerializerInternal serializer, PasswordHolder instance, CharBuf builder) {
                        builder.addQuoted(instance.getPassword());
                    }
                })
                .usePropertyOnly();
comment
created
RichardHightower
username_1
I think you meant that comment for the other issue.
comment
created
kyle-downey
username_2
Migrated comment to #292
comment