Skip to content

Commit 8476153

Browse files
committed
migrating to null safety
1 parent 478d22d commit 8476153

10 files changed

Lines changed: 95 additions & 90 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 0.6.0
2+
- Migrating to null safety
3+
14
## 0.5.5
25
- hotfix: dart not support '\0' escape
36

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ void main() {
3131
```
3232

3333
## Current limitations
34-
- It can parse String only, stream is not support
3534
- Only serialize classes which implement List and Map
3635

3736
## References

example/repl.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ void main() {
77
while (true) {
88
stdout.write('json5>');
99
var src = stdin.readLineSync();
10+
if (src == null) {
11+
print('break');
12+
return;
13+
}
1014
switch (src) {
1115
case '':
1216
continue;

lib/json5.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ abstract class JSON5 {
1818
/// are supported.
1919
///
2020
/// The altenative is [json5Encode(string)]
21-
static String stringify(dynamic object, {space = 0}) {
21+
static String? stringify(dynamic object, {space = 0}) {
2222
return render.stringify(object, null, space);
2323
}
2424

0 commit comments

Comments
 (0)