Ticket #6278: jsonrpc.diff

File jsonrpc.diff, 1.4 kB (added by kriszyp, 9 months ago)

Updates for name change and style issues

  • JsonRPC.js

     
    11dojo.provide("dojox.rpc.JsonRPC"); 
    22 
    33dojox.rpc.envelopeRegistry.register( 
    4         "JSON-RPC-1.0",function(str){return str == "JSON-RPC-1.0"},{ 
     4        "JSON-RPC-1.0",function(str){return str == "JSON-RPC-1.0";},{ 
    55                serialize: function(smd, method, data, options){ 
    66                        //not converted to json it self. This  will be done, if appropriate, at the  
    77                        //transport level 
     
    1212                                data: d, 
    1313                                contentType: 'application/json', 
    1414                                transport:"POST" 
    15                         } 
     15                        }; 
    1616                }, 
    1717 
    1818                deserialize: function(results){ 
     
    2828); 
    2929 
    3030dojox.rpc.envelopeRegistry.register( 
    31         "JSON-RPC-1.2",function(str){return str == "JSON-RPC-1.2"},{ 
     31        "JSON-RPC-2.0",function(str){return str == "JSON-RPC-2.0";},{ 
    3232                serialize: function(smd, method, data, options){ 
    3333                        var trans = method.transport || smd.transport || "POST"; 
    3434                        var d = dojox.rpc.toNamed(method, data); 
     
    3838                                data: d, 
    3939                                contentType: 'application/json', 
    4040                                transport:"POST" 
    41                         } 
     41                        }; 
    4242                }, 
    4343         
    4444                deserialize: function(results){