How to replace JSON with TOON?

Thank you all for your support.

Based on the suggested library from @xu-chris, I created a PoC using TOON with Phoenix Channels.

My approach:

  1. Updated the toon_ex library by adding a missing function so Phoenix can encode terms to iodata, and fixed some bugs.
  2. Updated the Phoenix config:
# Use Jason for JSON parsing in Phoenix
# config :phoenix, :json_library, Jason
config :phoenix, :json_library, ToonApp.MyToon
  1. Created a simple client in Elixir to verify it. I used the phoenix_client library.

Updated toon_ex repo. My PoC