On Nov 24, 2010, at 1:14 PM, Adam Walczak wrote:
>> How do you propose to serialize out the Throwable as XML or JSON?
>
> I think it should be configurable so that we can decide if we want
> xml, json oraz plain text.
>
> With plain text only the localizedMessage would be printed.
>
> xml and json should be printed with JAXB with some default rules for
> printing Throwabe.
>
> Not JAXB annotated exceptions should look like this:
>
> {
> class: "SomeException",
> superclasses: [
> "SomeSuperException",
> "SomeSuperSuperException"
> ],
> message: "Sdsfd sdfds dsf",
> localizedMessage: "Dsfdsfsd dsfds sdf"
> }
>
> JAXB annotated should at least have the above and more.
>
So you are suggesting the exception class should also be annotated
with JAXB annotations?
> Still got to try if this type of behaviour is easy to implement in the
> JAXB implementation that Jersey is using.
>
> But do you think the concept seams ok ?
>
In general yes, but i think it would be useful to merge where
appropriate Alexandru's ideas.
Paul.