title: Spring Data Page object serialization to JSON with Spring Boot 2?
body: <p>I am trying to upgrade my Spring Boot 1.5 project to Spring Boot 2.0.2. This includes an update to Spring Data 2.x as well.</p>
  
  <p>I have now noticed that the JSON representation of <code>Page</code> has changed. It now looks like:</p>
  
  <pre><code>{
      "content": [{
          "id": "96ab09c6-2cfc-4195-899b-899b623e6e97",
          "title": "Test Title",
          "shortDescription": "Short description",
          "description": "Test Description",
          "date": "2018-02-14",
          "imageUrl": "/api/images/newsposts/f637e6bd-a13a-4ebc-8c58-8ba639e09f70"
      }],
      "pageable": "INSTANCE",
      "totalPages": 1,
      "totalElements": 1,
      "last": true,
      "size": 0,
      "number": 0,
      "first": true,
      "numberOfElements": 1,
      "sort": {
          "unsorted": true,
          "sorted": false
      }
  }
  </code></pre>
  
  <p>If it is sorted, it looks similar to this:</p>
  
  <pre><code>    "pageable": {
          "sort": {
              "sorted": true,
              "unsorted": false
          },
          "offset": 0,
          "pageSize": 20,
          "pageNumber": 0,
          "paged": true,
          "unpaged": false
      },
      "totalElements": 1,
      "last": true,
      "totalPages": 1,
      "size": 20,
      "number": 0,
      "first": true,
      "numberOfElements": 1,
      "sort": {
          "sorted": true,
          "unsorted": false
      }
  </code></pre>
  
  <p>Notice the <code>pageable</code> element that was not there before. Also the <code>sort</code> element is not very useful. Is this something that was intended? Or it is just a bad idea to return <code>org.springframework.data.domain.Page</code> object in my REST controller?</p>