equal
deleted
inserted
replaced
38 return JSON.stringify(data); |
38 return JSON.stringify(data); |
39 }; |
39 }; |
40 |
40 |
41 IriSP.JSONSerializer.prototype.deserialize = function(data) { |
41 IriSP.JSONSerializer.prototype.deserialize = function(data) { |
42 return JSON.parse(data); |
42 return JSON.parse(data); |
|
43 }; |
|
44 |
|
45 IriSP.JSONSerializer.prototype.sync = function(callback) { |
|
46 /* we don't have to do much because jQuery handles json for us */ |
|
47 var wrapper = function(obj) { |
|
48 return function(data) { |
|
49 obj._data = data; |
|
50 callback(data); |
|
51 } |
|
52 }; |
|
53 |
|
54 this._DataLoader.get(this._url, wrapper(this)); |
43 }; |
55 }; |
44 |
56 |
45 IriSP.SerializerFactory = function(DataLoader) { |
57 IriSP.SerializerFactory = function(DataLoader) { |
46 this._dataloader = DataLoader; |
58 this._dataloader = DataLoader; |
47 }; |
59 }; |