Single page applications pose a unique and interesting set of problems. Libraries that offer two-way binding like KnockoutJS and AngularJS make it trivial to completely redraw a screen with new data delivered from the server via AJAX calls. However, what … Read on...
Category Archives: Knockout
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...