1.0.12 • Published 9 years ago

jerialize v1.0.12

Weekly downloads
-
License
MIT
Repository
-
Last release
9 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

9 years ago

1.0.11

9 years ago

1.0.10

9 years ago

1.0.9

10 years ago

1.0.8

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago