Skip to content

Support nullable fromJson #1560

@TekExplorer

Description

@TekExplorer

I have a type I get from a php project, which looks a bit like this:

{
  "object": "user",
  "attributes": {...}
}

And sometimes, that object can be nested

{
  "object": "user",
  "attributes": {
    "thing": {
      "object": "item"
      "attributes": {...}
    }
  }
}

This is fine.

What isnt fine, however, is the null_resource object, which looks like this:

{
  "object": "null_resource",
  "attributes": null // <<<<<<<<<<
}

uh oh. I dont want two layers of null!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions