Skip to content

Commit 0cc38b6

Browse files
Changed object types to any
1 parent 3925769 commit 0cc38b6

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -449,10 +449,10 @@ Tries to deserialize given JSON to a TypeScript object or array of objects.
449449
450450
The methods `serialize()` and `deserialize()` will automatically detect the dimension of your param (either object or array).
451451
In case you would like to force `json2typescript` to use a specific way, you can use the following methods instead:
452-
- `(object) serializeObject(instance: object)`
453-
- `(object[]) serializeArray(instanceArray: object[])`
454-
- `(object) deserializeObject(jsonObject: object, classReference: { new(): any })`
455-
- `(object[]) deserializeArray(jsonArray: object[], classReference: { new(): any })`
452+
- `(any) serializeObject(instance: any)`
453+
- `(any[]) serializeArray(instanceArray: any[])`
454+
- `(any) deserializeObject(jsonObject: any, classReference: { new(): any })`
455+
- `(any[]) deserializeArray(jsonArray: any[], classReference: { new(): any })`
456456

457457
>
458458

src/json2typescript/json-convert.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ export class JsonConvert {
394394
*
395395
* @throws throws an expection in case of failure
396396
*/
397-
private serializeObject_loopProperty(instance: any, classPropertyName: string, json: Object): void {
397+
private serializeObject_loopProperty(instance: any, classPropertyName: string, json: any): void {
398398

399399
// Get the mapping array
400400
let mapping = instance[Settings.MAPPING_PROPERTY];
@@ -456,7 +456,7 @@ export class JsonConvert {
456456
*
457457
* @throws throws an expection in case of failure
458458
*/
459-
private deserializeObject_loopProperty(instance: any, classPropertyName: string, json: Object): void {
459+
private deserializeObject_loopProperty(instance: any, classPropertyName: string, json: any): void {
460460

461461
// Get the mapping array
462462
let mapping = instance[Settings.MAPPING_PROPERTY];

0 commit comments

Comments
 (0)