com.hazelcast.com.eclipsesource.json

## Class PrettyPrint

- java.lang.Object
- - com.hazelcast.com.eclipsesource.json.WriterConfig
  - - com.hazelcast.com.eclipsesource.json.PrettyPrint

-     public class PrettyPrint
      extends WriterConfig

  Enables human readable JSON output by inserting whitespace between values.after commas and colons. Example:

       jsonValue.writeTo(writer, PrettyPrint.singleLine());

- - ### Field Summary

    - ### Fields inherited from class com.hazelcast.com.eclipsesource.json.WriterConfig

      `MINIMAL, PRETTY_PRINT`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `PrettyPrint(char[] indentChars)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected com.hazelcast.com.eclipsesource.json.JsonWriter` | `createWriter(Writer writer)`
    `static PrettyPrint` | `indentWithSpaces(int number)` Print every value on a separate line.
    `static PrettyPrint` | `indentWithTabs()` Do not break lines, but still insert whitespace between values.
    `static PrettyPrint` | `singleLine()` Print every value on a separate line.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PrettyPrint

          protected PrettyPrint(char[] indentChars)

  - ### Method Detail

    - #### singleLine

          public static PrettyPrint singleLine()

      Print every value on a separate line. Use tabs (`\t`) for indentation.
      Returns:
        A PrettyPrint instance for wrapped mode with tab indentation

    - #### indentWithSpaces

          public static PrettyPrint indentWithSpaces(int number)

      Print every value on a separate line. Use the given number of spaces for indentation.
      Parameters:
        `number` - the number of spaces to use
      Returns:
        A PrettyPrint instance for wrapped mode with spaces indentation

    - #### indentWithTabs

          public static PrettyPrint indentWithTabs()

      Do not break lines, but still insert whitespace between values.
      Returns:
        A PrettyPrint instance for single-line mode

    - #### createWriter

          protected com.hazelcast.com.eclipsesource.json.JsonWriter createWriter(Writer writer)

Copyright © 2018. All rights reserved.