How to use the json2typescript.ValueCheckingMode.DISALLOW_NULL function in json2typescript

To help you get started, we’ve selected a few json2typescript examples, based on popular ways it is used in public projects.

github harry-sm / BittrexRx / src / core / bittrex-rx-socket-client.ts View on Github external
private convert<T>(data: any, dataType: Model.ClassType<T>): T {
		const jsc: JsonConvert = new JsonConvert();
		jsc.valueCheckingMode = ValueCheckingMode.DISALLOW_NULL; // never allow null

		return jsc.deserialize(data, dataType);
	}

json2typescript

Provides TypeScript methods to map a JSON object to a JavaScript object on runtime

MIT
Latest version published 4 months ago

Package Health Score

73 / 100
Full package analysis