Skip to content

Commit 6ecdaa8

Browse files
committed
adding serializearray
1 parent f218421 commit 6ecdaa8

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "typescript-json-object-mapper",
3-
"version": "1.0.1",
3+
"version": "1.1.0",
44
"description": "Json Object mapper writing in TypeScript",
5-
"main": "dist/TypescriptJsonObjectMapper.js",
5+
"main": "dist/index.js",
66
"scripts": {},
77
"repository": "git+https://github.com/olaferlandsen/Typescript-Json-Object-Mapper.git",
88
"author": "Olaf Erlandsen <olaftriskel@gmail.com>",

src/core/JsonObjectMapper.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,7 @@ export class JsonObjectMapper {
6262
};
6363
return new Serialization(filter(args[1], args[0]));
6464
}
65+
public static serializeArray(dataArray: any[], view: typeof JsonView): Serialization {
66+
return new Serialization(dataArray.map(data => JsonObjectMapper.serialize(data, view).toJson()));
67+
}
6568
}

0 commit comments

Comments
 (0)