Skip to content

Commit ee3a4c7

Browse files
Corrected ReadMe information
1 parent b6a8bf8 commit ee3a4c7

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

CHANGELOG.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# v1.2.1 (2019-05-02)
2+
3+
## Bug Fixes
4+
5+
* Corrected ReadMe information, closes [#88](https://github.com/dhlab-basel/json2typescript/issues/88)
6+
17
# v1.2.0 (2019-02-21)
28

39
## Features
@@ -107,4 +113,4 @@ It is now possible to map an JSON object to an TypeScript array, then the object
107113
Added method `serializeString()`, changed property names and behaviour.
108114

109115
# 0.9.1 (2017-10-06):
110-
First version released to the public.
116+
First version released to the public.

README.md

+4-9
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,8 @@ Even if you don't have any errors in your IDE, `json2typescript` will not proper
240240
241241
## Class and property decorators
242242
243-
Decorators should be used whenever you would like to map JSON with TypeScript data.
243+
Decorators should be used whenever you would like to map JSON with TypeScript data.
244+
As of now, you must not use more than one decorator per class or property.
244245
245246
### Class decorators
246247
@@ -256,13 +257,7 @@ in certain cases cause the deserializer to not work as same class names will
256257
overwrite the property descriptors. It is advised to explicitly ID your
257258
objects as above.
258259
259-
> Tip: Make sure you import `JsonObject` from `json2typescript`.
260-
261-
```typescript
262-
@JsonProperty("jsonPropName", String, true)
263-
@JsonProperty("jsonPropertyName", String, true)
264-
name: string = undefined;
265-
```
260+
> Tip: Make sure you import `JsonObject` from `json2typescript`.
266261
267262
#### First parameter: classIdentifier (optional)
268263
@@ -283,7 +278,7 @@ export class User {
283278
```
284279
285280
Important note: You must assign any (valid) value or `undefined` to your property at
286-
initialization, otherwise our mapper does **not** work.
281+
initialization, otherwise our mapper does **not** work and will simply ignore the property.
287282
288283
> Tip: Make sure you import `JsonObject` and `JsonProperty` from `json2typescript`.
289284

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "json2typescript",
3-
"version": "1.2.0",
3+
"version": "1.2.1",
44
"description": "Provides TypeScript methods to map a JSON object to a JavaScript object on runtime",
55
"keywords": [
66
"convert",

0 commit comments

Comments
 (0)