Mesut,

You can write a GeneralizedFieldHandler and a FieldHandlerFactory. The FieldHandlerFactory will prevent you from having to specify your GeneralizedFieldHandler on every field that is a boolean. You can set the FieldHandlerFactory directly on the Introspector as such:

   Marshaller m = new Marshaller(writer);
   ClassDescriptorResolverImpl cdr = new ClassDescriptorResolverImpl();
   cdr.getIntrospector().addFieldHandlerFactory(factory);
   m.setResolver(cdr);

Hope that helps,

--Keith

Mesut Celik wrote:
Hi all,

I wanna serialize boolean values of my objects as 0/1. I think one
possible way of doing so is writing Generalized Field handler.
Is there any other approach? or what is the best solution for such an issue?

regards,
mesut

-------------------------------------------------
If you wish to unsubscribe from this list, please send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------




-------------------------------------------------
If you wish to unsubscribe from this list, please send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------

Reply via email to