crossbario / crossbario/autobahn-python

JSON auto-conversion for binary on Python 2

Open
#574 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

docs enhancement wamp
Dominant language
Python
Stars
2.5k
Forks
768
PR merge metrics
No merged PRs in 30d

Description

This does work on Python 3 already, but NOT Python 2.


The WAMP spec describes a method to encode binary strings in JSON by prepending the base64 encoding of the binary string with \0. See here.

This isn't implemented. It would need to hook into the string processing with the JSON serializer.

More so, as we target PyPy anyway, we should probably aim for writing our own, bundled JSON thing:

  • implements transparent binary bidirectional conversion
  • pure Python, optimized for PyPy

We should have more unit tests regarding cross-serializer transparency. I think this is quite important, since it's one of the selling points of WAMP.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the existing JSON serializer's string-processing path and the current Python 3 binary conversion behavior. Then inspect the unit tests for cross-serializer transparency. Done means Python 2 supports bidirectional WAMP binary conversion and the serializer behavior is covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.