Different JSON output when using custom json serializer in Spring Data Rest

后端 未结 4 1559
走了就别回头了
走了就别回头了 2020-12-09 05:43

After adding a custom Jackson serializer based on the official documenation I\'ve observed a slightly different json output format.

This example is base

4条回答
  •  一个人的身影
    2020-12-09 06:20

    Projection is one solution and overriding one method of JsonSerializer is another:

        @Override
        public boolean isUnwrappingSerializer() {
            return true;
        }
    

    Then you should be able to omit the start and end of an object.

    Find my blog post here.

提交回复
热议问题