We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ab64998 commit 71cd57fCopy full SHA for 71cd57f
lib/src/common/misc_service.dart
@@ -1,5 +1,4 @@
1
import 'dart:async';
2
-import 'dart:convert';
3
import 'package:github/src/common.dart';
4
import 'package:github/src/json.dart';
5
lib/src/json.dart
@@ -16,7 +16,12 @@ class GitHubJson {
16
static String encode(Object object, {String indent}) {
17
final encoder = JsonEncoder.withIndent(indent, _toEncodable);
18
if (object is Map) {
19
- object = createNonNullMap(object);
+ object = createNonNullMap(object as Map, recursive: true);
20
+ }
21
+ if (object is List) {
22
+ object = (object as List)
23
+ .map((e) => e is Map ? createNonNullMap(e, recursive: true) : e)
24
+ .toList();
25
}
26
return encoder.convert(object);
27
0 commit comments