Package jodd.json

Class PrettyJsonSerializer


  • public class PrettyJsonSerializer
    extends JsonSerializer
    JsonSerializer that prints out formatted JSON. It is slower, but the output is prettier.
    • Field Detail

      • 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 Detail

      • PrettyJsonSerializer

        public PrettyJsonSerializer()
    • Method Detail

      • identSize

        public void identSize​(int ident)
        Defines ident size in number of identChar to be used for single indentation.
      • identChar

        public void identChar​(char identChar)
        Sets ident character. Usually its a space or a tab.
      • breakLine

        private void breakLine​(JsonContext jsonContext)
      • ident

        private void ident​(JsonContext jsonContext)