code: private static byte[] transform(final InputStream body) throws IOException {
          final ByteArrayOutputStream res = new ByteArrayOutputStream();
          try (JsonReader rdr = Json.createReader(body)) {
              final JsonObject obj = rdr.readObject();
              try (JsonWriter wrt = Json.createWriterFactory(
                  Collections.singletonMap(JsonGenerator.PRETTY_PRINTING, true)
                  )
                  .createWriter(res)
              ) {
                  wrt.writeObject(obj);
              }
          } catch (final JsonException ex) {
              throw new IOException(ex);
          }
          return res.toByteArray();
      }
docs: Format body with proper indents.
  @param body Response body
  @return New properly formatted body
  @throws IOException If fails