Details

    • Type: New Feature
    • Status: Closed
    • Priority: 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
          rstoya05-aop 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
          rstoya05-aop 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
          rstoya05-aop Rossen Stoyanchev added a comment -

          Marking resolved for now but feel free to comment.

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

          Any chance to backport this to 4.0.x?

          Show
          marceloverdijk Marcel Overdijk added a comment - Any chance to backport this to 4.0.x?
          Hide
          sdeleuze 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
          sdeleuze 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
          bjc 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
          bjc 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:
              sdeleuze Sébastien Deleuze
              Reporter:
              bwhiteman 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:
                1 year, 10 weeks ago