Class PrettyJsonSerializer
java.lang.Object
jodd.json.JsonSerializer
jodd.json.PrettyJsonSerializer
JsonSerializer that prints out formatted JSON.
It is slower, but the output is prettier.-
Nested Class Summary
Nested classes/interfaces inherited from class JsonSerializer
JsonSerializer.Defaults -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate intprivate charprivate intprivate booleanprivate booleanFields inherited from class JsonSerializer
classMetadataName, excludedTypeNames, excludedTypes, excludeEmpty, excludeNulls, pathSerializersMap, rules, serializerResolver, strictStringEncoding, typeSerializersMap -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidbreakLine(JsonContext jsonContext) createJsonContext(Appendable appendable) Creates new JSON context.private voidident(JsonContext jsonContext) voididentChar(char identChar) Sets ident character.voididentSize(int ident) Defines ident size in number ofidentCharto be used for single indentation.Methods inherited from class JsonSerializer
create, createPrettyOne, deep, exclude, exclude, exclude, excludeEmpty, excludeNulls, excludeTypes, excludeTypes, include, include, onValue, serialize, serialize, setClassMetadataName, strictStringEncoding, withClassMetadata, withSerializer, withSerializer
-
Field Details
-
deep
private int deep -
breakOnNewObject
private boolean breakOnNewObject -
identSize
private int identSize -
identChar
private char identChar -
prefixSeparatorBySpace
private boolean prefixSeparatorBySpace -
suffixSeparatorBySpace
private boolean suffixSeparatorBySpace
-
-
Constructor Details
-
PrettyJsonSerializer
public PrettyJsonSerializer()
-
-
Method Details
-
identSize
public void identSize(int ident) Defines ident size in number ofidentCharto be used for single indentation. -
identChar
public void identChar(char identChar) Sets ident character. Usually its a space or a tab. -
breakLine
-
ident
-
createJsonContext
Description copied from class:JsonSerializerCreates new JSON context.- Overrides:
createJsonContextin classJsonSerializer
-