SampleJsonSchemaGenerator - RicoSuter/NJsonSchema GitHub Wiki

The SampleJsonSchemaGenerator generates a JSON Schema from sample JSON data.

var schema = JsonSchema.FromSampleJson("...");
var schemaJson = schema.ToJson();

... or create a SampleJsonSchemaGenerator instance and call the Generate("...") method.