source: class JsonWriterTest {
  
      private final ObjectMapper mapper;
      private final Charset charset;
  
      @Test
      public void writeObject() throws Exception {
  
target:         ByteArrayOutputStream os = new ByteArrayOutputStream();
          JsonWriter writer = writer(os);
          writer.writeObject()
                  .writeStringField("hello", "world", true)
                  .writeNumberField("missing", 1, false)
                  .done()
                  .close();
  
          assertThat(os.toString(charset.name())).isEqualTo("{\"hello\":\"world\"}");
      }
  
  }