On Wed, Dec 16, 2020 at 10:11 PM [email protected] <
[email protected]> wrote:

> Hi,
>
> I think this isn't common usage. Nothing is written. Should I decorate it
> with any annotation ?
>
> objectMapper.writeValue( System.out, new Name(){
> public Class<? extends Annotation> annotationType() {
> return Annotation.class;
> }
>
> public String getInterface() {
> return "interface";
> }
> });
> }
>
> public @interface Name{
> String getInterface() default "interface";
>
>
What exactly are you trying to achieve here? I would expect that to produce
output like

{"interface":"interface"}

with code like that; I would assume it gets treated like any POJO.

-+ 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/jackson-user/CAGrxA26HS7hJZb13fNGreX7QgiXF8q2B-RJhwDMfj3suj-LHRQ%40mail.gmail.com.

Reply via email to