Rev 1778 | Rev 1782 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1778 | Rev 1780 | ||
---|---|---|---|
Line 31... | Line 31... | ||
31 | .include(1.5.0/docs/api/java/lang/Float.html">Float.class) |
31 | .include(1.5.0/docs/api/java/lang/Float.html">Float.class) |
32 | .include(1.5.0/docs/api/java/lang/String.html">String.class); |
32 | .include(1.5.0/docs/api/java/lang/String.html">String.class); |
33 | genson = gensonBuilder.create(); |
33 | genson = gensonBuilder.create(); |
34 | 34 | ||
35 | } |
35 | } |
36 | public 1.5.0/docs/api/java/lang/String.html">String toJson() throws 1.5.0/docs/api/java/io/IOException.html">IOException |
36 | public 1.5.0/docs/api/java/lang/String.html">String toJson(){ |
37 | { |
- | |
38 | return genson.serialize(this); |
37 | return genson.serialize(this); |
39 | } |
38 | } |
40 | 39 | ||
41 | public static RepositoryDocumentInterfaceImpl loadFromJson(1.5.0/docs/api/java/lang/String.html">String json) throws 1.5.0/docs/api/java/io/IOException.html">IOException { |
40 | public static RepositoryDocumentInterfaceImpl loadFromJson(1.5.0/docs/api/java/lang/String.html">String json) throws 1.5.0/docs/api/java/io/IOException.html">IOException { |
42 | return genson.deserialize(json, RepositoryDocumentInterfaceImpl.class); |
41 | return genson.deserialize(json, RepositoryDocumentInterfaceImpl.class); |
43 | } |
42 | } |
44 | 43 | ||
45 | public JSONObject toJsonObject() throws 1.5.0/docs/api/java/io/IOException.html">IOException, JSONException { |
44 | public JSONObject toJsonObject() throws JSONException { |
46 | return new JSONObject(toJson()); |
45 | return new JSONObject(toJson()); |
47 | } |
46 | } |
48 | 47 | ||
49 | public static JSONArray toJsonArray(List<RepositoryDocumentInterfaceImpl> collections) throws 1.5.0/docs/api/java/io/IOException.html">IOException, JSONException { |
48 | public static JSONArray toJsonArray(List<RepositoryDocumentInterfaceImpl> collections) throws 1.5.0/docs/api/java/io/IOException.html">IOException, JSONException { |
50 | return new JSONArray(genson.serialize(collections)); |
49 | return new JSONArray(genson.serialize(collections)); |