Package org.approvej.json.jackson
Class JsonStringPrettyPrinter
java.lang.Object
org.approvej.json.jackson.JsonStringPrettyPrinter
- All Implemented Interfaces:
Function<String,
,String> JsonPrinter<String>
,org.approvej.print.Printer<String>
A
Printer
for JSON strings that should be pretty-printed.-
Method Summary
Modifier and TypeMethodDescriptionstatic JsonStringPrettyPrinter
Creates aJsonStringPrettyPrinter
using the defaultJsonMapper
.static JsonStringPrettyPrinter
jsonStringPrettyPrinter
(com.fasterxml.jackson.databind.ObjectMapper objectMapper) Creates aJsonStringPrettyPrinter
using the givenObjectMapper
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.approvej.json.jackson.JsonPrinter
filenameExtension
-
Method Details
-
jsonStringPrettyPrinter
public static JsonStringPrettyPrinter jsonStringPrettyPrinter(com.fasterxml.jackson.databind.ObjectMapper objectMapper) Creates aJsonStringPrettyPrinter
using the givenObjectMapper
.- Parameters:
objectMapper
- theObjectMapper
used to create theObjectReader
andObjectWriter
.- Returns:
- a
JsonStringPrettyPrinter
using the givenObjectMapper
- See Also:
-
jsonStringPrettyPrinter
Creates aJsonStringPrettyPrinter
using the defaultJsonMapper
.- Returns:
- a
JsonStringPrettyPrinter
using the defaultJsonMapper
.
-
apply
-