Groups
Groups
Sign in
Groups
Groups
jackson-user
Conversations
Labels
About
Send feedback
Help
Serialize annotation values
25 views
Skip to first unread message
radhakris...@gmail.com
unread,
Dec 17, 2020, 1:11:21 AM
12/17/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to jackson-user
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"
;
}
Thanks.
Tatu Saloranta
unread,
Dec 19, 2020, 12:29:56 AM
12/19/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to jackson-user
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 +-
radhakris...@gmail.com
unread,
Jan 4, 2021, 4:05:53 AM
1/4/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to jackson-user
I don't have a design for code that needs this at this time and will report back when I have.
Mohan
Reply all
Reply to author
Forward
0 new messages