So you’re building a modern web app? That means you’re likely running a variety of client-side libraries and custom business logic in JavaScript. And one of the first hurdles you run into is “Hey, I need some data from the … Read on...
Tag Archives: JSON
Serializing Knockout ViewModels to JSON: Quotes matter
The Knockout MVVM framework makes it dirt simple to serialize your ViewModels to JSON:
ko.toJSON(viewModel);
However, if you’re wondering why some observables aren’t being serialized, note that observables that are initialized empty aren’t serialized to JSON. So if your … Read on...