Hi All!
But what can I do when I want to use annotation, and I don't have access to
the mapper?
Eg:
@JsonSerialize(using = ASerializer.class)
public class AClass {
...
}
BR, Zsolt
2015. június 23., kedd 16:18:36 UTC+2 időpontban Tim Dudgeon a következőt
írta:
>
> Hi,
>
> I'm writing a cust
Hi!
I have a structure that outputs this:
I use @JsonTypeInfo(use=JsonTypeInfo.Id.NAME, include=As.PROPERTY,
property="type") on the common base class.
How could I get the following output:
It does not matter, if it can not be deserialized by Jackson, it is
ment name...
BR, Zsolt
2017. március 20., hétfő 19:22:10 UTC+1 időpontban Tatu Saloranta a
következőt írta:
>
> What is the POJO you are serializing?
>
> -+ Tatu +-
>
>
> On Mon, Mar 20, 2017 at 5:11 AM, Zsolt Balanyi > wrote:
> > Hi!
h `BeanProperty`.
> `BeanProperty` has accessors for annotation directly; or, you can then
> call `AnnotationIntrospector` (accessible from `SerializerProvider`
> that is also passed).
>
> -+ Tatu +-
>
>
> On Mon, Mar 20, 2017 at 5:26 AM, Zsolt Balanyi > wrote:
> >
e created/used as the
> standard serializer is to register `BeanSerializerModifier`, and
> override handling of `modifySerializer`.
>
> -+ Tatu +-
>
>
> On Mon, Mar 20, 2017 at 11:58 AM, Zsolt Balanyi > wrote:
> > Hi!
> >
> > What I meant is t
t;
> On Mon, Mar 20, 2017 at 11:42 AM, Zsolt Balanyi > wrote:
> > Hi!
> >
> > public class Page {
> >public UIElement uiElement;
> > }
> >
> > @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include =
> > JsonTypeInfo.As.PROPERTY, property
Bean(De)SerializerModifier is the way to go.
>
> -+ Tatu +-
>
>
> On Mon, Mar 20, 2017 at 1:08 PM, Zsolt Balanyi > wrote:
> > Hi!
> >
> > OK, thanks, then I'll go that way!
> >
> > BR, Zsolt
> >
> > 2017. március 20.,
This article points out exactly the fact, that the usage of
BeanSerializerModifier makes in unnecessary to use the annotation!
So I would happily contribute to make the @JsonSerialize smarter. :)
BR, Zsolt
2017. március 21., kedd 8:25:51 UTC+1 időpontban Zsolt Balanyi a következőt
írta:
>
&
http://stackoverflow.com/questions/31056215/how-to-access-default-jackson-serialization-in-a-custom-serializer
2017. március 21., kedd 9:16:17 UTC+1 időpontban Zsolt Balanyi a következőt
írta:
>
> This article points out exactly the fact, that the usage of
> BeanSerializerModifier
that I register it
for an abstract class, and the concrete implementors still use their
defaults?
BR Zsolt
2017. március 22., szerda 5:38:56 UTC+1 időpontban Tatu Saloranta a
következőt írta:
>
> On Tue, Mar 21, 2017 at 12:16 AM, Zsolt Balanyi > wrote:
> > Hi!
> >
&
UTC+1 időpontban Tatu Saloranta a
következőt írta:
>
> On Wed, Mar 22, 2017 at 1:31 AM, Zsolt Balanyi > wrote:
> > Hi!
> >
> > The tag name can be easily renamed, by
> >
> > if (gen instanceof ToXmlGenerator) {
> > ((ToXmlGener
project?
BR, Zsolt
2017. március 23., csütörtök 6:45:18 UTC+1 időpontban Tatu Saloranta a
következőt írta:
>
> On Wed, Mar 22, 2017 at 10:24 PM, Zsolt Balanyi > wrote:
> > Hi!
> >
> > Of course my code is related to XML:
>
> Right, I just meant it regarding g
());
}
produces the wrong output.
Thanks for your help and hints! Hope I helped someone...
BR, Zsolt
2017. március 24., péntek 1:06:37 UTC+1 időpontban Tatu Saloranta a
következőt írta:
>
> On Thu, Mar 23, 2017 at 11:34 AM, Zsolt Balanyi > wrote
13 matches
Mail list logo