{"category":"data","endpoint":"https://setget.net/v1/tools/json-schema-infer","examples":[{"input":{"indent":0,"text":"[{\"id\":1,\"name\":\"a\"},{\"id\":2}]"},"output":{"text":"{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"integer\"},\"name\":{\"type\":\"string\"}},\"required\":[\"id\"]}}"}}],"input_schema":{"additionalProperties":false,"properties":{"indent":{"default":2,"description":"Spaces per level. 0 gives one compact line.","maximum":8,"minimum":0,"type":"integer"},"text":{"description":"Example JSON to describe.","examples":["[{\"id\":1,\"name\":\"a\"},{\"id\":2}]"],"type":"string"}},"required":["text"],"type":"object"},"keywords":["json schema","generate","infer","schema from json","types"],"related":["json-schema-validate","json-format"],"slug":"json-schema-infer","summary":"Generate a JSON Schema from example JSON. Arrays of objects are merged into one item shape.","tier":"inline","title":"JSON Schema generator","url":"https://setget.net/tools/json-schema-infer"}
