Skip to content

Public JSON ser/de helpers on the response types (following up on the invitation in #16) #18

Description

@kittimzhe

Following up on the invitation in #16: public JSON serialization/deserialization helpers on the answer and response types.

The gap: consumers who need JSON-able output currently have to either know the SDK is Pydantic-backed this release (model_dump()) or reach into the private _core.json module. Neither is documented. Anyone whose stack serializes SDK objects with another library (msgspec-based MCP stacks, structured logging, caching layers) hits this exactly where blakestone-x/jev-mcp did.

Suggestion: a documented to_json_dict() (naming TBD) on the answer/Schema types returning plain builtins, so callers never need to know which ser/de library backs the SDK. Optionally a from_json classmethod for symmetry.

One paragraph, one small API — happy to paste a patch sketch here if useful.

Activity

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