1.0.12 • Published 7 years ago

jerialize v1.0.12

Weekly downloads
-
License
MIT
Repository
-
Last release
7 years ago

#Jerialize

Preperation

Nodejs:

npm install jerialize --save

Systemjs:

jspm install npm:jerialize

Usage

import * as jerialize from "jerialize";
class MyClass{

    @jerialize.serialize()
    public simpleProperty: string;
    @jerialize.serialize()
    public simpleArray: Array<string>;
    @jerialize.serialize({type: AnotherClass}) //Providing the type is required
    public objectProperty: AnotherClass;
    @jerialize.serialize({type: AnotherClass}) //Providing the type is required, arrays are autodetected
    public objectArray: Array<AnotherClass>;
    
    constructor(){ // The constructor has to be without parameters or each parameter has to be optional
        ...
    }

}
var jerializer.Serializer = new jerializer.Serializer();
var testObj: MyClass = new MyClass();
//fill the fields of testObj
var serialized: string = <string>serializer.serialize(testObj,true);
var deserialized: MyClass = serializer.deserialize<MyClass>(MyClass,serialized);
1.0.12

7 years ago

1.0.11

7 years ago

1.0.10

7 years ago

1.0.9

8 years ago

1.0.8

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago