Class CustomJSONWriter

  • Direct Known Subclasses:
    XFAJSONWriter

    public class CustomJSONWriter
    extends JSONWriter
    Extending JSONReader, just to get rid of annoying CheckedException Should not be exported.
    • Field Detail

      • objectStack

        public java.util.Stack<java.lang.String> objectStack
    • Constructor Detail

      • CustomJSONWriter

        public CustomJSONWriter​(java.io.Writer w)
    • Method Detail

      • array

        public CustomJSONWriter array()
        Description copied from class: JSONWriter
        Begin appending a new array. All values until the balancing endArray will be appended to this array. The endArray method must be called to mark the array's end.
        Overrides:
        array in class JSONWriter
        Returns:
        this
      • key

        public CustomJSONWriter key​(java.lang.String s)
        Description copied from class: JSONWriter
        Append a key. The key will be associated with the next value. In an object, every value must be preceded by a key.
        Overrides:
        key in class JSONWriter
        Parameters:
        s - A key string.
        Returns:
        this
      • object

        public CustomJSONWriter object()
        Description copied from class: JSONWriter
        Begin appending a new object. All keys and values until the balancing endObject will be appended to this object. The endObject method must be called to mark the object's end.
        Overrides:
        object in class JSONWriter
        Returns:
        this
      • value

        public CustomJSONWriter value​(boolean b)
        Description copied from class: JSONWriter
        Append either the value true or the value false.
        Overrides:
        value in class JSONWriter
        Parameters:
        b - A boolean.
        Returns:
        this
      • value

        public CustomJSONWriter value​(java.lang.Object o)
        Description copied from class: JSONWriter
        Append an object value.
        Overrides:
        value in class JSONWriter
        Parameters:
        o - The object to append. It can be null, or a Boolean, Number, String, JSONObject, or JSONArray, or an object that implements JSONString.
        Returns:
        this