Atlassian REST
  1. Atlassian REST
  2. REST-221

Provide a way to customise JSON output

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      Right now, the JSON serializer is configured deep in the plugin. As far as I can tell, it's impossible to even register a custom serializer for a specific class. There's some fleeting promise you could do it with @Provider annotations, but that turns out to be a sad, painful illusion.

      You can attempt to register a competing JSON serializer in your plugin, but so far that's shown an annoying tendency to randomly not work, which suggests that when you register two serializers for the same output type, nobody wins.

      At a bare minimum, you should be able to export Jackson "Module" implementations in your bundle, and have them picked up by the JacksonJsonProviderFactory.

      Even better, would be some way to hook right into the configuration process so you can include your own config directives as well.

      Alternatively, I'm considering throwing out atlassian-rest entirely and replacing it with a servlet, as at least then I'd know what it was doing and how.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Charles Miller
            Reporter:
            Charles Miller
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Who's Looking?