Skip to content

Getter property serialization #49

Open
@jonghshin

Description

@jonghshin

It looks like it is not serializing getters.
The code below does not serialize the getter property.

export class ProjectModule extends ProjectBase {
  @JsonProperty({ name: "t" })
  public get ProjectType(): ProjectType {
    return ProjectType.Module;
  }
}

It only works with the code like this.

export class ProjectModule extends ProjectBase {
  @JsonProperty({ name: "t" })
  public readonly ProjectType: ProjectType = ProjectType.Module;
}

Any plan to implement getters and setters de/serialization?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions