public static String getJson(final Object objectNode, final boolean prettyPrint)
      throws JsonProcessingException {
    final ObjectMapper mapper = getObjectMapper();
    if (prettyPrint) {
      return mapper.writerWithDefaultPrettyPrinter().writeValueAsString(objectNode);
    } else {
      return mapper.writeValueAsString(objectNode);
    }
  }
Gets json.

@param objectNode the object node
@param prettyPrint true for pretty print
@return the json
@throws JsonProcessingException the json processing exception
config/src/main/java/org/hyperledger/besu/config/JsonUtil.java