wyfo / apischema

JSON (de)serialization, GraphQL and JSON schema generation using Python typing.

Home Page:https://wyfo.github.io/apischema/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JSON string to JSON schema?

xucian opened this issue · comments

commented

Possible?

Thanks!

I don't really understand the request. Do you think about this kind of function?

assert json_to_schema('{"foo": 0}') == '{"$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": {"foo": {"type": "integer"}}}'