|
107 | 107 | },
|
108 | 108 | "jsonObject": {
|
109 | 109 | "name": "toJSONObject",
|
110 |
| - "signature": "\tpublic JSONObject toJsonObject() ", |
| 110 | + "signature": "\tpublic JSONObject toJSONObject() ", |
111 | 111 | "bodyStart": "{\n\t\tJSONObject jsonObject = new JSONObject();\n\t\ttry {\n",
|
112 | 112 | "bodyEnd": "\t\t} catch (JSONException e) {\n\t\t\t// TODO Auto-generated catch block.\n\t\t\tprintStackTrace();\n\t\t}\n\t\treturn jsonObject;\n\t}\n",
|
113 | 113 | "codeForEachProperty": "\t\t\tjsonObject.put(\"<!JsonKeyName!>\", <!VarName!>);\n",
|
114 |
| - "codeForEachCustomProperty": "\t\t\tjsonObject.put(\"<!JsonKeyName!>\", <!VarName!>.toJsonObject());\n", |
115 |
| - "codeForEachCustomArrayProperty": "\t\t\tif (<!VarName!> != null && <!VarName!>.length > 0) {\n\t\t\t\tJSONArray <!VarName!>JsonArray = new JSONArray();\n\t\t\t\tfor (<!ElementType!> <!VarName!>Element : <!VarName!>) {\n\t\t\t\t\t<!VarName!>JsonArray.put(<!VarName!>Element.toJsonObject());\n\t\t\t\t}\n\t\t\t\tjsonObject.put(\"<!JsonKeyName!>\", <!VarName!>JsonArray);\n\t\t\t}\n", |
| 114 | + "codeForEachCustomProperty": "\t\t\tjsonObject.put(\"<!JsonKeyName!>\", <!VarName!>.toJSONObject());\n", |
| 115 | + "codeForEachCustomArrayProperty": "\t\t\tif (<!VarName!> != null && <!VarName!>.length > 0) {\n\t\t\t\tJSONArray <!VarName!>JsonArray = new JSONArray();\n\t\t\t\tfor (<!ElementType!> <!VarName!>Element : <!VarName!>) {\n\t\t\t\t\t<!VarName!>JsonArray.put(<!VarName!>Element.toJSONObject());\n\t\t\t\t}\n\t\t\t\tjsonObject.put(\"<!JsonKeyName!>\", <!VarName!>JsonArray);\n\t\t\t}\n", |
116 | 116 | "comment": "",
|
117 | 117 | "checked": "checked"
|
118 | 118 | },
|
|
125 | 125 | "bodyEndWithDependency": "\t\treturn jsonObject.toString();\n\t}\n",
|
126 | 126 | "bodyEnd": "\t\t} catch (JSONException e) {\n\t\t\t// TODO Auto-generated catch block.\n\t\t\tprintStackTrace();\n\t\t}\n\t\treturn jsonObject.toString();\n\t}\n",
|
127 | 127 | "codeForEachProperty": "\t\t\tjsonObject.put(\"<!JsonKeyName!>\", <!VarName!>);\n",
|
128 |
| - "codeForEachCustomProperty": "\t\t\tjsonObject.put(\"<!JsonKeyName!>\", <!VarName!>.toJsonObject());\n", |
129 |
| - "codeForEachCustomArrayProperty": "\t\t\tif (<!VarName!> != null && <!VarName!>.length > 0) {\n\t\t\t\tJSONArray <!VarName!>JsonArray = new JSONArray();\n\t\t\t\tfor (<!ElementType!> <!VarName!>Element : <!VarName!>) {\n\t\t\t\t\t<!VarName!>JsonArray.put(<!VarName!>Element.toJsonObject());\n\t\t\t\t}\n\t\t\t\tjsonObject.put(\"<!JsonKeyName!>\", <!VarName!>JsonArray);\n\t\t\t}\n", |
| 128 | + "codeForEachCustomProperty": "\t\t\tjsonObject.put(\"<!JsonKeyName!>\", <!VarName!>.toJSONObject());\n", |
| 129 | + "codeForEachCustomArrayProperty": "\t\t\tif (<!VarName!> != null && <!VarName!>.length > 0) {\n\t\t\t\tJSONArray <!VarName!>JsonArray = new JSONArray();\n\t\t\t\tfor (<!ElementType!> <!VarName!>Element : <!VarName!>) {\n\t\t\t\t\t<!VarName!>JsonArray.put(<!VarName!>Element.toJSONObject());\n\t\t\t\t}\n\t\t\t\tjsonObject.put(\"<!JsonKeyName!>\", <!VarName!>JsonArray);\n\t\t\t}\n", |
130 | 130 | "comment": "",
|
131 | 131 | "checked": "checked"
|
132 | 132 | }
|
|
0 commit comments