Class HoconConfigurationLoader.Builder

    • Method Detail

      • prettyPrinting

        public HoconConfigurationLoader.Builder prettyPrinting​(boolean prettyPrinting)
        Set whether output from this loader will be pretty-printed or not.

        Output will always print with a fixed indent of 4 spaces per level. This is a limitation of the underlying library, so it may become customizable at some point in the future.

        Parameters:
        prettyPrinting - whether to pretty-print
        Returns:
        this builder
        Since:
        4.0.0
      • emitComments

        public HoconConfigurationLoader.Builder emitComments​(boolean emitComments)
        Set whether comments should be emitted.

        Comments will always be loaded from files and stored in memory.

        Parameters:
        emitComments - whether to emit comments
        Returns:
        this builder
        Since:
        4.0.0
      • emitJsonCompatible

        public HoconConfigurationLoader.Builder emitJsonCompatible​(boolean jsonCompatible)
        Set whether output generated by this loader should be json-compatible.

        Whatever format input is received in, this will output JSON. To be fully spec-compliant, comment output must also be disabled.

        Parameters:
        jsonCompatible - to emit json-format output
        Returns:
        this builder
        Since:
        4.0.0