sysid / sse-starlette

BSD 3-Clause "New" or "Revised" License
504 stars 35 forks source link

Handle JSON-serializable messages (e.g. Python objects: dict, list) #79

Closed m-roberts closed 9 months ago

m-roberts commented 9 months ago

Adds native JSON support for Python objects. Fixes #21 which was closed but not resolved.

sysid commented 9 months ago

@m-roberts thank you for the PR! Collaboration and contribution is appreciated.

However, I am reluctant to embark on your PR because:

  1. I am not sure your code is working, there are not tests
  2. More important, though SRP: I still think sse-starlette should not get involved with json serialization business. As your code demonstrates, it is easily handled by the consumer.