Skip to content

Struct and class support #1

@jcd

Description

@jcd
struct Foo {
   string name;
   string age;
}

Foo f = json.get!Foo(myjson);

also works the other way around

auto f = Foo("myname", 12);
json2.put("myfoo", f);

Maybe even introduce a UDA for optional fields:

struct Foo {
   string name;
   @optional string age;
}


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