title: How to test json structure in spring boot
body: <p>I found this code to test if a json string is equal to another string</p>
  <pre><code>@RunWith(SpringRunner.class)
  @SpringBootTest
  @AutoConfigureMockMvc
  public class MockMvcExampleTests {
  
      @Autowired
      private MockMvc mvc;
  
      @Test
      public void exampleTest() throws Exception {
          this.mvc.perform(get(&quot;/&quot;)).andExpect(status().isOk())
                  .andExpect(content().string(&quot;Hello World&quot;));
      }
  
  }
  </code></pre>
  <p>Do you know how to test the json structure ? Like check if the object contains id, name, age ... whatever the values are.
  Thanks.</p>