I have some JSON containing anonymous objects coming to my client-side. Is there some built-in mechanism or external library for converting these anonymous objects into strongly-typed TypeScript objects? Is there something like AutoMapper for doing this?
My objects are complex types, with complex types as properties.
mixin
function that allows you to mixin properties from one object to another. Then just cast your strongly-typed object intoany
and pass it into the mapper with your JSON object. The strongly-typed object will be filled just like any plain old JavaScript object. – Stenson