Skip to content

Helpers for JSON mailbox messages #17

@jml

Description

@jml

Lots of mailbox messages (i.e. the bytes in Messages.Body) are JSON encoded. The Magic Wormhole protocol documentation doesn't insist that this is the case, but all extant messages are JSON encoded.

There are some ways we can make this more convenient:

  • A pair of ToBody and FromBody typeclasses

    class ToBody a where
        toBody :: a -> Messages.Body
    
    class FromBody a where
        fromBody :: Messages.Body -> Maybe a
  • sendEncryptedJSON and receiveEncryptedJSON helpers

Probably other ways too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions