Package 

Class AFJsonObject

    • Field Summary

      Fields 
      Modifier and Type Field Description
      public final static Object NULL
    • Constructor Summary

      Constructors 
      Constructor Description
      AFJsonObject() Creates a {@code AFJsonObject} with no name/value mappings.
      AFJsonObject(Map copyFrom)
    • Method Summary

      Modifier and Type Method Description
      AFJsonObject put(String name, Object value)
      boolean has(String name) Returns true if this object has a mapping for {@code name}.
      Object get(String name) Returns the value mapped by {@code name}, or throws if no such mapping exists.
      String getString(String name) Returns the value mapped by {@code name} if it exists, coercing it ifnecessary, or throws if no such mapping exists.
      String toString() Encodes this object as a compact JSON string, such as:
      {"query":"Pizza","locations":[94043,90210]}
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AFJsonObject

        AFJsonObject()
        Creates a {@code AFJsonObject} with no name/value mappings.
      • AFJsonObject

        AFJsonObject(Map copyFrom)
    • Method Detail

      • has

         boolean has(String name)

        Returns true if this object has a mapping for {@code name}. The mappingmay be NULL.

      • get

         Object get(String name)

        Returns the value mapped by {@code name}, or throws if no such mapping exists.

      • getString

         String getString(String name)

        Returns the value mapped by {@code name} if it exists, coercing it ifnecessary, or throws if no such mapping exists.

      • toString

         String toString()

        Encodes this object as a compact JSON string, such as:

        {"query":"Pizza","locations":[94043,90210]}