1
+ {
2
+ "modelStart" : " {\n " ,
3
+ "reservedKeywords" : [
4
+ " associatedtype" ,
5
+ " class" ,
6
+ " deinit" ,
7
+ " enum" ,
8
+ " extension" ,
9
+ " fileprivate" ,
10
+ " func" ,
11
+ " import" ,
12
+ " init" ,
13
+ " inout" ,
14
+ " internal" ,
15
+ " let" ,
16
+ " open" ,
17
+ " operator" ,
18
+ " private" ,
19
+ " protocol" ,
20
+ " public" ,
21
+ " static" ,
22
+ " struct" ,
23
+ " subscript" ,
24
+ " typealias" ,
25
+ " var" ,
26
+ " break" ,
27
+ " case" ,
28
+ " continue" ,
29
+ " default" ,
30
+ " defer" ,
31
+ " do" ,
32
+ " else" ,
33
+ " fallthrough" ,
34
+ " for" ,
35
+ " guard" ,
36
+ " if" ,
37
+ " in" ,
38
+ " repeat" ,
39
+ " return" ,
40
+ " switch" ,
41
+ " where" ,
42
+ " while" ,
43
+ " as" ,
44
+ " Any" ,
45
+ " catch" ,
46
+ " false" ,
47
+ " is" ,
48
+ " nil" ,
49
+ " rethrows" ,
50
+ " super" ,
51
+ " self" ,
52
+ " Self" ,
53
+ " throw" ,
54
+ " throws" ,
55
+ " true" ,
56
+ " try" ,
57
+ " associativity" ,
58
+ " convenience" ,
59
+ " dynamic" ,
60
+ " didSet" ,
61
+ " final" ,
62
+ " get" ,
63
+ " infix" ,
64
+ " indirect" ,
65
+ " lazy" ,
66
+ " left" ,
67
+ " mutating" ,
68
+ " none" ,
69
+ " nonmutating" ,
70
+ " optional" ,
71
+ " override" ,
72
+ " postfix" ,
73
+ " precedence" ,
74
+ " prefix" ,
75
+ " Protocol" ,
76
+ " required" ,
77
+ " right" ,
78
+ " set" ,
79
+ " Type" ,
80
+ " unowned" ,
81
+ " weak" ,
82
+ " willSet"
83
+ ],
84
+
85
+ "dataTypes" : {
86
+ "arrayType" : " [<!ElementType!>]" ,
87
+ "generic" : " Any" ,
88
+ "string" : " String" ,
89
+ "boolean" : " Bool" ,
90
+ "float" : " Double" ,
91
+ "doubleType" : " Double" ,
92
+ "characterType" : " Character" ,
93
+ "longType" : " Double" ,
94
+ "int" : " Int"
95
+ },
96
+
97
+ "typesWithCustomFetchMethod" : [
98
+ " String" ,
99
+ " Bool" ,
100
+ " Double" ,
101
+ " Int" ,
102
+ " Any"
103
+ ],
104
+
105
+ "customFetchTypeReplacement" : [
106
+ " .stringValue" ,
107
+ " .boolValue" ,
108
+ " .doubleValue" ,
109
+ " .intValue" ,
110
+ " "
111
+ ],
112
+
113
+ "modelDefinition" : " \n <!ModelIdentifier!> <!ModelName!> " ,
114
+ "getter" : " " ,
115
+ "setter" : " " ,
116
+ "fileExtension" : " swift" ,
117
+ "instanceVarDefinition" : " \t let <!VarName!>: <!VarType!>?\n " ,
118
+ "modelEnd" : " \n }" ,
119
+ "staticImports" : " import Foundation" ,
120
+ "supportsCamelcasing" : true ,
121
+ "methods" : {
122
+ "constructorName" : " Initializer" ,
123
+ "constructorChecked" : " checked" ,
124
+ "constructors" : [{
125
+ "signature" : " \t init(_ dict: [String: Any]) " ,
126
+ "bodyStart" : " {\n " ,
127
+ "bodyEnd" : " \t }\n " ,
128
+ "codeForEachProperty" : " \t\t <!VarName!> = dict[\" <!JsonKeyName!>\" ] as? <!VarType!>\n " ,
129
+ "codeForEachCustomProperty" : " \n\t\t if let <!VarName!>Dict = dict[\" <!JsonKeyName!>\" ] as? [String: Any] {\n\t\t\t <!VarName!> = <!VarType!>(<!VarName!>Dict)\n\t\t }\n " ,
130
+ "codeForEachCustomArrayProperty" : " \n\t\t if let <!VarName!>DictArray = dict[\" <!JsonKeyName!>\" ] as? [[String: Any]] {\n\t\t\t <!VarName!> = <!VarName!>DictArray.map { <!ElementType!>($0) }\n\t\t }\n " ,
131
+ "comment" : " "
132
+ }],
133
+ "others" : {
134
+ "dictionaryMethod" : {
135
+ "name" : " toDictionary" ,
136
+ "signature" : " \t func toDictionary() -> [String: Any] " ,
137
+ "bodyStart" : " {\n\t\t var jsonDict = [String: Any]()\n " ,
138
+ "bodyEnd" : " \t\t return jsonDict\n\t }\n " ,
139
+ "codeForEachProperty" : " \t\t jsonDict[\" <!JsonKeyName!>\" ] = <!VarName!>\n " ,
140
+ "codeForEachCustomProperty" : " \t\t jsonDict[\" <!JsonKeyName!>\" ] = <!VarName!>?.toDictionary()\n " ,
141
+ "codeForEachCustomArrayProperty" : " \t\t jsonDict[\" <!JsonKeyName!>\" ] = <!VarName!>?.map { $0.toDictionary() }\n " ,
142
+ "comment" : " " ,
143
+ "checked" : " checked"
144
+ }
145
+ }
146
+ }
147
+ }
0 commit comments