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