Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Complete
    • Affects Version/s: 3.1.2
    • Fix Version/s: 4.1 RC1
    • Component/s: Web
    • Labels:
      None
    • Last commented by a User:
      true

      Description

      Jackson's JSONView annotation allows the developer to control which aspects of a method are serialiazed. With the current implementation, the Jackson view writer must be used but then the content type is not available. It would be better if as part of the RequestBody annotation, a JSONView could be specified.

        Issue Links

          Activity

          Hide
          Rossen Stoyanchev added a comment -

          We have an initial proposal ready that provides support for Jackson's @JsonView on @ResponseBody controller methods or methods returning ResponseEntity. See this commit here for details including a reference documentation update.

          If anyone is interested please try it out with 4.1.0.BUILD-SNAPSHOT via repo.spring.io/snapshot.

          Either way comments welcome!

          Show
          Rossen Stoyanchev added a comment - We have an initial proposal ready that provides support for Jackson's @JsonView on @ResponseBody controller methods or methods returning ResponseEntity . See this commit here for details including a reference documentation update. If anyone is interested please try it out with 4.1.0.BUILD-SNAPSHOT via repo.spring.io/snapshot . Either way comments welcome!
          Hide
          Rossen Stoyanchev added a comment -

          Marking resolved for now but feel free to comment.

          Show
          Rossen Stoyanchev added a comment - Marking resolved for now but feel free to comment.
          Hide
          Marcel Overdijk added a comment -

          Any chance to backport this to 4.0.x?

          Show
          Marcel Overdijk added a comment - Any chance to backport this to 4.0.x?
          Hide
          Sébastien Deleuze added a comment -

          Current 4.0.x status is that only critical fixes can be integrated in order to avoid regressions, so it will be only available starting 4.1.x.

          Show
          Sébastien Deleuze added a comment - Current 4.0.x status is that only critical fixes can be integrated in order to avoid regressions, so it will be only available starting 4.1.x.
          Hide
          Benjamin Conlan added a comment -

          Is there a way to have this play nicely with the @Secured annotation so weaker roles only see a subset of the object?

          Show
          Benjamin Conlan added a comment - Is there a way to have this play nicely with the @Secured annotation so weaker roles only see a subset of the object?

            People

            • Assignee:
              Sébastien Deleuze
              Reporter:
              Brandon Whiteman
              Last updater:
              Juergen Hoeller
            • Votes:
              25 Vote for this issue
              Watchers:
              24 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                43 weeks, 6 days ago