JsonGenerator.@Deprecated
public final class CompactJsonFormatter
extends java.lang.Object
| Constructor and Description | 
|---|
| CompactJsonFormatter()Deprecated. 
 Replaced by  JsonGenerator.generate(JsonNode)andJsonGenerator.generate(Writer, JsonNode).
 For example, usenew JsonGenerator().style(COMPACT).generate(Writer, JsonNode) ornew JsonGenerator().style(COMPACT).generate(JsonNode)  | 
| Modifier and Type | Method and Description | 
|---|---|
| static CompactJsonFormatter | fieldOrderNormalisingCompactJsonFormatter()Deprecated. 
 Replaced by  JsonGenerator.generateWithFieldSorting(JsonNode)andJsonGenerator.generateWithFieldSorting(Writer, JsonNode).
 For example, usenew JsonGenerator().style(COMPACT).generateWithFieldSorting(Writer, JsonNode) ornew JsonGenerator().style(COMPACT).generateWithFieldSorting(JsonNode)  | 
| static CompactJsonFormatter | fieldOrderPreservingCompactJsonFormatter()Deprecated. 
 Replaced by  JsonGenerator.generate(JsonNode)andJsonGenerator.generate(Writer, JsonNode).
 For example, usenew JsonGenerator().style(COMPACT).generate(Writer, JsonNode) ornew JsonGenerator().style(COMPACT).generate(JsonNode)  | 
| java.lang.String | format(JsonNode jsonNode)Returns the specified  JsonNodeformatted as a String. | 
| void | format(JsonNode jsonNode,
      java.io.Writer writer)Streams the specified  JsonNodeformatted to the specifiedWriter. | 
public CompactJsonFormatter()
JsonGenerator.generate(JsonNode) and JsonGenerator.generate(Writer, JsonNode).
 For example, use
 new JsonGenerator().style(COMPACT).generate(Writer, JsonNode) 
 or
 new JsonGenerator().style(COMPACT).generate(JsonNode) JsonFormatter that formats JSON as compactly as possible.public static CompactJsonFormatter fieldOrderPreservingCompactJsonFormatter()
JsonGenerator.generate(JsonNode) and JsonGenerator.generate(Writer, JsonNode).
 For example, use
 new JsonGenerator().style(COMPACT).generate(Writer, JsonNode) 
 or
 new JsonGenerator().style(COMPACT).generate(JsonNode) JsonFormatter that formats JSON as compactly as possible, outputting the fields of objects in the order they were defined.JsonFormatter that formats JSON as compactly as possible, outputting the fields of objects in the order they were defined.public static CompactJsonFormatter fieldOrderNormalisingCompactJsonFormatter()
JsonGenerator.generateWithFieldSorting(JsonNode) and JsonGenerator.generateWithFieldSorting(Writer, JsonNode).
 For example, use
 new JsonGenerator().style(COMPACT).generateWithFieldSorting(Writer, JsonNode) 
 or
 new JsonGenerator().style(COMPACT).generateWithFieldSorting(JsonNode) JsonFormatter that formats JSON as compactly as possible, outputting the fields of objects in alphabetic order.
 In the event that more than one field with the same name exists in an object, the relative order of those fields is preserved.JsonFormatter that formats JSON as compactly as possible, outputting the fields of objects in alphabetic order.public final java.lang.String format(JsonNode jsonNode)
JsonFormatterJsonNode formatted as a String.format in interface JsonFormatterjsonNode - the JsonNode to format.JsonNode formatted as a String.public final void format(JsonNode jsonNode, java.io.Writer writer) throws java.io.IOException
JsonFormatterJsonNode formatted to the specified Writer.format in interface JsonFormatterjsonNode - the JsonNode to format.writer - the Writer to stream the formatted JsonNode to.java.io.IOException - if there was a problem writing to the Writer.