File tree 1 file changed +12
-3
lines changed
1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -178,11 +178,20 @@ class HtmlGeneratorInstance {
178
178
void _generateJson () {
179
179
File jsonFile = createOutputFile (out, 'index.json' );
180
180
String json = JSON .encode (documentedElements.map ((ModelElement e) {
181
- Map data = {'name' : e.name, 'href' : e.href};
181
+ // TODO: find a better string for type
182
+ Map data = {
183
+ 'name' : e.name,
184
+ 'href' : e.href,
185
+ 'type' : e.runtimeType.toString ()
186
+ };
182
187
if (e is EnclosedElement ) {
183
- data['enclosedElementName' ] =
184
- (e as EnclosedElement ).enclosingElement.name;
188
+ EnclosedElement ee = e as EnclosedElement ;
189
+ data['enclosedBy' ] = {
190
+ 'name' : ee.enclosingElement.name,
191
+ 'type' : ee.enclosingElement.runtimeType.toString ()
192
+ };
185
193
}
194
+ return data;
186
195
}).toList ());
187
196
jsonFile.writeAsStringSync (json);
188
197
}
You can’t perform that action at this time.
0 commit comments