code: public static String toPrettyString(Object jsonObject)
              throws JsonGenerationException, IOException {
          final StringWriter sw = new StringWriter();
          writePrettyPrint(sw, jsonObject);
          return sw.toString();
      }
docs: Writes the given JSON-LD Object out to a String, using indentation and
  new lines to improve readability.
  
  @param jsonObject
  The JSON-LD Object to serialize.
  @return A JSON document serialised to a String.
  @throws JsonGenerationException
  If there is a JSON error during serialization.
  @throws IOException
  If there is an IO error during serialization.