jupyter-server/kernel_gateway

Decoding message data in nodeJS demo.

3goats opened this issue · 1 comments

I'm experimenting with the jupyter-websocket Mode its all working pretty well so far.

The web socket demo (nodeJS) is returning my data like this:

metadata: {},
content: {
name: 'stdout',
text: '\x1B[1;39m{\r\n' +
' \x1B[0m\x1B[34;1m"id"\x1B[0m\x1B[1;39m: \x1B[0m\x1B[0;32m"0ee772d0-958d-11ed-9148-f1a6c7cdfb41"\x1B[0m\x1B[1;39m,\r\n' +
' \x1B[0m\x1B[34;1m"certificateAuthority"\x1B[0m\x1B[1;39m: \x1B[0m\x1B[0;32m"BUILTIN"\x1B[0m\x1B[1;39m,\r\n' +
' \x1B[0m\x1B[34;1m"certificateAuthorityAccountId"\x1B[0m\x1B[1;39m: \x1B[0m\x1B[0;32m"0ee724b0-958d-11ed-9148-f1a6c7cdfb41"\x1B[0m\x1B[1;39m\r\n' +
'\x1B[1;39m}\x1B[0m\r\n'
},
buffers: [],
Do you know what encoding is being used - can't seem to decode it.

Seems that the python demo deals with the decoding. i.e. looks like this:

Received message type: stream
Content: {
"id": "0ee772d0-958d-11ed-9148-f1a6c7cdfb41",
"certificateAuthority": "BUILTIN",
"certificateAuthorityAccountId": "0ee724b0-958d-11ed-9148-f1a6c7cdfb41"
}

Opened in error