google / google/json_serializable.dart
Support nullable `fromJson`
Open
- Dominant language
- Dart
- Stars
- 1.6k
- Forks
- 461
- Avg merge
- 45m
- Merged PRs (30d)
- 1
Description
I have a type I get from a php project, which looks a bit like this:
```json
{
"object": "user",
"attributes": {...}
}
```
And sometimes, that object can be nested
```dart
{
"object": "user",
"attributes": {
"thing": {
"object": "item"
"attributes": {...}
}
}
}
```
This is fine.
What _isnt_ fine, however, is the `null_resource` object, which looks like this:
```dart
{
"object": "null_resource",
"attributes": null // <<<<<<<<<<
}
```
uh oh. I dont want two layers of null!
Contributor guide
Assessment
This issue has not been assessed yet.