Class Json.JsonBuilder<T>

    • Field Detail

      • ignoreEmptyBuilders

        protected final boolean ignoreEmptyBuilders
    • Constructor Detail

      • JsonBuilder

        JsonBuilder​(boolean ignoreEmptyBuilders)
        Parameters:
        ignoreEmptyBuilders - If set to true all empty builders added to this builder will be ignored during build()
    • Method Detail

      • isEmpty

        public abstract boolean isEmpty()
        Returns:
        true if there are no elements/properties, false otherwise
      • build

        public abstract String build()
        Returns:
        a string representation
      • isIgnored

        protected boolean isIgnored​(Object value)
        Parameters:
        value -
        Returns:
        true if the value is null or an empty builder and ignoreEmptyBuilders is set to true, false otherwise
      • isValuesEmpty

        protected boolean isValuesEmpty​(Collection<Object> values)
      • self

        protected abstract T self()