Skip to content

Global inference mode for JsonProvider #1018

@mjgpy3

Description

@mjgpy3

Excellent library, thanks for all the hard work!

Is there a way to specify that a nested JSON value is of the same type as wrapper object?

For example, today I was trying to use the provider on an object that looks like

{
  "id": 1234,
  "children": [
    {
      "id": 789,
      "children": []
    }
  ]
}

Where everything in the object follows that basic form any number of levels deep or wide.

Do you think it's possible to provide a type that looks basically like?

type Root = { Id: int; Children: Root [] }

I look forward to hearing your thoughts, thank you.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions