1
19
20 package com.liferay.portal.kernel.json;
21
22 import java.io.Writer;
23
24 import java.util.Date;
25 import java.util.Iterator;
26
27
33 public interface JSONObject {
34
35 public boolean getBoolean(String key);
36
37 public double getDouble(String key);
38
39 public int getInt(String key);
40
41 public JSONArray getJSONArray(String key);
42
43 public JSONObject getJSONObject(String key);
44
45 public long getLong(String key);
46
47 public String getString(String key);
48
49 public boolean has(String key);
50
51 public boolean isNull(String key);
52
53 public Iterator<String> keys();
54
55 public int length();
56
57 public JSONObject put(String key, boolean value);
58
59 public JSONObject put(String key, double value);
60
61 public JSONObject put(String key, int value);
62
63 public JSONObject put(String key, long value);
64
65 public JSONObject put(String key, Date value);
66
67 public JSONObject put(String key, JSONArray value);
68
69 public JSONObject put(String key, JSONObject value);
70
71 public JSONObject put(String key, String value);
72
73 public Object remove(String key);
74
75 public String toString();
76
77 public String toString(int indentFactor) throws JSONException;
78
79 public Writer write(Writer writer) throws JSONException;
80
81 }