json-typescript-mapper icon indicating copy to clipboard operation
json-typescript-mapper copied to clipboard

How ignore a attribute to be serialize/deserialize ?

Open hug-dsi opened this issue 8 years ago • 1 comments

Is there a @JsonIgnore like in Jackson java api ? because we don't want to serialize/deserialize some attribute of a TS Class ` export class Patient { firstname: string = void 0; id: string = void 0; lastname: string = void 0; sex: string = void 0;

@JsonProperty({ clazz: TEST }) test: TEST[] = void 0;

// @JsonIgnore we don't want to serialize this oneProperty: string = void 0;
} `

How to specify a default value when deserialize make a attribute value equals to undefined or null ?

hug-dsi avatar May 31 '17 15:05 hug-dsi

Would be cool if this could be added. I'm trying to keep my functions for my class, but they get overriden since they are not in the JSON

appienvanveen avatar Sep 21 '17 12:09 appienvanveen