You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+29-3Lines changed: 29 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -43,11 +43,11 @@ Lets have a look at an example:
43
43
```typescript
44
44
classSimpleRoster {
45
45
@JsonProperty()
46
-
private name:String;
46
+
private name:String=undefined;
47
47
@JsonProperty()
48
-
private worksOnWeekend:Boolean;
48
+
private worksOnWeekend:Boolean=undefined;
49
49
@JsonProperty()
50
-
private numberOfHours:Number;
50
+
private numberOfHours:Number=undefined;
51
51
@JsonProperty({type:Date})
52
52
private systemDate:Date;
53
53
@@ -140,7 +140,33 @@ and make sure to import it in a global place, like app.ts:
140
140
import"reflect-metadata";
141
141
```
142
142
If you are using Angular 2 you should already have this shim installed.
143
+
143
144
## Things to remember
145
+
146
+
### Ignoring `name` metadata during de-serialization
147
+
If you have an use case where you want to not use `name` metadata using de-serialization, the you cna turn if off by setting `ignoreNameMetadata` to true (default is false). Here is an example usage:
0 commit comments