Class BuilderUtils


  • public class BuilderUtils
    extends Object
    Utility class for StringBuilder
    Author:
    Sebastien Briquet - sebfz1
    • Method Detail

      • append

        public static void append​(StringBuilder builder,
                                  String key,
                                  Object value)
        Helper method that appends a key/value JSON pair to the specified builder
        The value will *not* be quoted, except if the value is null, "null" will be returned.
        Parameters:
        builder - the StringBuilder
        key - the key
        value - the object
      • append

        public static void append​(StringBuilder builder,
                                  String key,
                                  String value)
        Helper method that appends a key/value JSON pair to the specified builder. The value will be quoted
        Parameters:
        builder - the StringBuilder
        key - the key
        value - the value