Thanks very much.
In that case , is there an alternative for something I am trying to achieve
class Trade {
int id;
String trader;
}
class FX extends Trade {
double rate;
}
Can my json on FX object have nested fields from a flat object structure. ?
Is writing a custom serialiser the only way or I can use annotations
assuming FX is 3rd party and can't be changed .
{
id:123
trader : "Sam"
product {
rate : 0.34
}
}
Thanks again
On Tuesday, March 26, 2019 at 1:35:03 PM UTC+11, Tatu Saloranta wrote:
>
> On Mon, Mar 25, 2019 at 5:18 PM Suraj Mathai <[email protected]
> <javascript:>> wrote:
> >
> > Hi,
> >
> > I have Parent Class and Subclasses . Can I customize the serialization
> of fields of parent class using ParentClassSerializer and fields of
> subclass using SubClassSerializer. how do i do this ?
> >
> > Thanks in advance for your time and help
>
> If you mean using 2 serializers for one value, no, I don't think there
> is a way to do that.
>
> -+ Tatu +-
>
--
You received this message because you are subscribed to the Google Groups
"jackson-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.