@Override
 public void serializeAsField(Object bean, JsonGenerator jgen, SerializerProvider prov)
     throws Exception {
   // We know the type (although interface can't expose it)
   String value = ((Bean) bean).name;
   // Convert nulls to "", otherwise upper case
   value = (value == null) ? "" : value.toUpperCase();
   jgen.writeStringField("name", value);
 }