Skip to content

Commit 6bc3690

Browse files
committed
toJSONObject method change
1 parent f348190 commit 6bc3690

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

languages/JavaAndroid.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,12 @@
107107
},
108108
"jsonObject": {
109109
"name": "toJSONObject",
110-
"signature": "\tpublic JSONObject toJsonObject() ",
110+
"signature": "\tpublic JSONObject toJSONObject() ",
111111
"bodyStart": "{\n\t\tJSONObject jsonObject = new JSONObject();\n\t\ttry {\n",
112112
"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",
113113
"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",
116116
"comment": "",
117117
"checked": "checked"
118118
},
@@ -125,8 +125,8 @@
125125
"bodyEndWithDependency": "\t\treturn jsonObject.toString();\n\t}\n",
126126
"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",
127127
"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",
130130
"comment": "",
131131
"checked": "checked"
132132
}

languages/JavaGson.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,12 @@
107107
},
108108
"jsonObject": {
109109
"name": "toJSONObject",
110-
"signature": "\tpublic JSONObject toJsonObject() ",
110+
"signature": "\tpublic JSONObject toJSONObject() ",
111111
"bodyStart": "{\n\t\tJSONObject jsonObject = new JSONObject();\n\t\ttry {\n",
112112
"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",
113113
"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",
116116
"comment": "",
117117
"checked": ""
118118
},
@@ -125,8 +125,8 @@
125125
"bodyEndWithDependency": "\t\treturn jsonObject.toString();\n\t}\n",
126126
"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",
127127
"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",
130130
"comment": "",
131131
"checked": ""
132132
}

0 commit comments

Comments
 (0)