Manage bytes in JSON-RPC
issue4637 review9121002
This commit is contained in:
1 parent
02490c0cda
commit
da36dc5120
1 file changed
+2
-2
+2
-2
@@ -130,7 +130,7 @@
|
||||
case 'timedelta':
|
||||
value = Sao.TimeDelta(null, value.seconds);
|
||||
break;
|
||||
case 'buffer':
|
||||
case 'bytes':
|
||||
// javascript's atob does not understand linefeed
|
||||
// characters
|
||||
var byte_string = atob(value.base64.replace(/\s/g, ''));
|
||||
@@ -217,7 +217,7 @@
|
||||
}
|
||||
} else if (value instanceof Uint8Array) {
|
||||
value = {
|
||||
'__class__': 'buffer',
|
||||
'__class__': 'bytes',
|
||||
'base64': btoa(String.fromCharCode.apply(null, value))
|
||||
};
|
||||
if (parent) {
|
||||
|
||||
Reference in new issue
Block a user