You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am reaching out with a question regarding the implementation of your JSON-RPC 2.0 API, specifically in the context of WebSocket transport.
According to the JSON-RPC 2.0 specification, messages are expected to be JSON-encoded text. However, it seems that your WebSocket implementation sends responses as binary data (e.g., serialized JSON), which deviates from the standard's expectation of JSON text messages.
This has caused issues when using the API in browser environments, where binary messages are received as Blob objects, requiring additional steps to decode them into JSON. While this is manageable with workarounds, it introduces challenges for strict JSON-RPC 2.0 clients and libraries, which are designed to expect text-based JSON responses.
Could you clarify why the WebSocket transport sends binary data instead of JSON text, and if there are any plans to align the implementation with the JSON-RPC 2.0 specification in the future?
Thank you for your time and for the work you’re doing on the Nimiq ecosystem!
Best regards
Daniel Schmitz
The text was updated successfully, but these errors were encountered:
Dear Nimiq Development Team,
I am reaching out with a question regarding the implementation of your JSON-RPC 2.0 API, specifically in the context of WebSocket transport.
According to the JSON-RPC 2.0 specification, messages are expected to be JSON-encoded text. However, it seems that your WebSocket implementation sends responses as binary data (e.g., serialized JSON), which deviates from the standard's expectation of JSON text messages.
This has caused issues when using the API in browser environments, where binary messages are received as Blob objects, requiring additional steps to decode them into JSON. While this is manageable with workarounds, it introduces challenges for strict JSON-RPC 2.0 clients and libraries, which are designed to expect text-based JSON responses.
Could you clarify why the WebSocket transport sends binary data instead of JSON text, and if there are any plans to align the implementation with the JSON-RPC 2.0 specification in the future?
Thank you for your time and for the work you’re doing on the Nimiq ecosystem!
Best regards
Daniel Schmitz
The text was updated successfully, but these errors were encountered: