Skip to content

How to convert a JSON_Value to a given struct? #22

@berdal84

Description

@berdal84

I have a question related to this issue, but it since I don't see any fix, I have a question:

My case look like this:

{
     persons: {
        "alice": { ... },
        "bob": { ... },
        "john": { ... },
     }
}
Data :: struct {
    persons: Table(string, Person);
}

Person :: struct {
    name: string;
    description: string;
    alias: []string;
     // etc.
}

Is there a typed way to get a Person from a given JSON_Value ? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions