-
public class AFJsonObject
-
-
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 AFJsonObjectput(String name, Object value)booleanhas(String name)Returns true if this object has a mapping for {@code name}.Objectget(String name)Returns the value mapped by {@code name}, or throws if no such mapping exists.StringgetString(String name)Returns the value mapped by {@code name}if it exists, coercing it ifnecessary, or throws if no such mapping exists.StringtoString()Encodes this object as a compact JSON string, such as: {"query":"Pizza","locations":[94043,90210]}-
-
Constructor Detail
-
AFJsonObject
AFJsonObject()
Creates a{@code AFJsonObject}with no name/value mappings.
-
AFJsonObject
AFJsonObject(Map copyFrom)
-
-
Method Detail
-
put
AFJsonObject put(String name, Object value)
-
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.
-
-
-
-