Page Menu
Home
Code
Search
Configure Global Search
Log In
Files
F884502
JsonRPC.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
JsonRPC.js
View Options
/*
Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
Available via Academic Free License >= 2.1 OR the modified BSD license.
see: http://dojotoolkit.org/license for details
*/
if
(
!
dojo
.
_hasResource
[
"dojox.rpc.JsonRPC"
]){
dojo
.
_hasResource
[
"dojox.rpc.JsonRPC"
]
=
true
;
dojo
.
provide
(
"dojox.rpc.JsonRPC"
);
dojo
.
require
(
"dojox.rpc.Service"
);
(
function
(){
function
_1
(
_2
){
return
{
serialize
:
function
(
_3
,
_4
,
_5
,
_6
){
var
d
=
{
id
:
this
.
_requestId
++
,
method
:
_4
.
name
,
params
:
_5
};
if
(
_2
){
d
.
jsonrpc
=
_2
;
}
return
{
data
:
dojo
.
toJson
(
d
),
handleAs
:
"json"
,
contentType
:
"application/json"
,
transport
:
"POST"
};
},
deserialize
:
function
(
_7
){
if
(
"Error"
==
_7
.
name
){
_7
=
dojo
.
fromJson
(
_7
.
responseText
);
}
if
(
_7
.
error
){
var
e
=
new
Error
(
_7
.
error
.
message
||
_7
.
error
);
e
.
_rpcErrorObject
=
_7
.
error
;
return
e
;
}
return
_7
.
result
;
}};
};
dojox
.
rpc
.
envelopeRegistry
.
register
(
"JSON-RPC-1.0"
,
function
(
_8
){
return
_8
==
"JSON-RPC-1.0"
;
},
dojo
.
mixin
({
namedParams
:
false
},
_1
()));
dojox
.
rpc
.
envelopeRegistry
.
register
(
"JSON-RPC-2.0"
,
function
(
_9
){
return
_9
==
"JSON-RPC-2.0"
;
},
_1
(
"2.0"
));
})();
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Apr 6, 10:29 (2 w, 9 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25014
Default Alt Text
JsonRPC.js (1 KB)
Attached To
rZED Zed
Event Timeline
Log In to Comment