I want to create plugin with REST facade which returns List<Option> value.
When executing an exeption is thrown:
org.codehaus.jackson.map.JsonMappingException: No serializer found for class com.atlassian.jira.issue.customfields.option.LazyLoadedOption and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS) )
Sure, I can create a class wrapper with fields and use @JsonSerialize annotation with my custom JsonSerializer<Option> class.
But I want register my serializer to the global ObjectMapper to avoid redundant classes creation.
How to?
Community moderators have prevented the ability to post new answers.
For all who intent to expose an Active Object via REST interface should refer to https://answers.atlassian.com/questions/289164. There seams to be no elegant solution at all.
You shouldn't generally need to be delving as deep as the LazyLoadedOption stuff - work with the options at that level, not their internals - just get the list of options and let JIRA worry about laziness, databases etc
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Nic Brough [Adaptavist], could you help me please? :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.