Skip to content

JSON support? #8

Closed
Closed

Description

@jcrist

The schema handling logic and struct objects aren't MessagePack specific, and could be adopted for other protocols. This would allow an application to switch between JSON and MessagePack, while making use of the same schemas and objects throughout. I don't plan on working on this anytime soon, but adding support for JSON here isn't unreasonable. Unlike MessagePack though, parsing JSON is nontrivial, so adding support would require some care.

Activity

  1. jcrist commented on Jun 28, 2021

    @jcrist
    MemberAuthor

    I no longer think this makes sense (at least for now). With the addition of extension types (and encoder hooks), there is enough msgpack specific things in here that anything json-specific would likely best be handled in a separate repo.

  2. jcrist commented on Jul 7, 2021

    @jcrist
    MemberAuthor

    Actually, I am going to reopen this. Except for msgspec.Ext, everything here still applies to json.

  3. reopened this on Jul 7, 2021
  4. adriangb commented on Aug 10, 2021

    @adriangb
    Contributor

    It could be nice to have something like Pydantic but where the model and validation definition are completely separate from the serialization protocol so that the serialization can be a pluggable piece.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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