public static String toStringHelper(Document document) {

        return document.getClass().getSimpleName()
            + " {"
            + document.getData().entrySet().stream()
            .map(e -> new AbstractMap.SimpleImmutableEntry<>(e.getKey(), VALUE_MAPPER.apply(e.getValue())))
            .map(e -> "\"" + e.getKey() + "\": " + (e.getValue() == null ? "null" : quoteIfString(e.getValue())))
            .collect(joining(", "))
            + "}";
    }
Helps documents to format a {@code toString()}-method.

@param document the document
@return         the string
runtime-parent/runtime-config/src/main/java/com/speedment/runtime/config/util/DocumentUtil.java