chuck.js/lib/Protocol/Parser.js
2012-07-08 01:37:53 +02:00

15 lines
No EOL
229 B
JavaScript

define(function() {
function Parser() {
}
Parser.prototype.encode = function(message){
return JSON.stringify(message);
}
Parser.prototype.decode = function(message){
return JSON.parse(message);
}
return Parser;
});