私は基本的なハローワークの例でjsonを取得し、それを自動マッピングしてからobservableにバインドしようとしていますが、基本的な問題が発生していると確信しています。
ajax呼び出しから返されたJSON
"{\"Content\":\"hello world\"}"
JS
function ViewModel() {
var self = this;
self.message = ko.observable();
$.getJSON("/home/getmessage", function (response) {
var mapped = ko.mapping.fromJSON(response);
self.message(mapped.Content);
});
};
ko.applyBindings(new ViewModel());
期待していた「helloworld」の代わりに次のものを取得しています
function c(){if(0<arguments.length){if(!c.equalityComparer||!c.equalityComparer(d,arguments[0]))c.I(),d=arguments[0],c.H();return this}a.U.La(c);return d}