Class JSONObject.KVMap

  • All Implemented Interfaces:
    JSON
    Enclosing class:
    JSONObject

    public static class JSONObject.KVMap
    extends java.lang.Object
    implements JSON
    A map whose key or value can be JSON. A map is encoded as JSON as an array of entries. Each entry is a key value pair separated with :
    Author:
    Pinaki Poddar
    • Constructor Detail

      • KVMap

        public KVMap()
    • Method Detail

      • put

        public void put​(java.lang.Object k,
                        java.lang.Object v)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • asString

        public java.lang.StringBuilder asString​(int indent)
        Description copied from interface: JSON
        Render into a string buffer.
        Specified by:
        asString in interface JSON
        Parameters:
        indent - level at which this instance is being rendered
        Returns:
        a mutable buffer