Many classes use private variables that are prefixed with an underscore. These are exposed using getters/setters. The JSON payload doesn't use underscores.
This library should allow for automatic checking and serialization.
Example -
Getters and Setters
class Bar {
constructor(private _foo: string} {
}
get foo() { return this._foo; };
}
}
Usage:
let bar = TSON.parse('{"foo":"something"}', Bar);
// "foo" serializes directly into Bar's _foo property
bar.foo == 'something'; // is true