You can try the JSON Schema Faker. It will take a schema and generate/output a JSON object that will validate against the schema.

Code available on githubcom

Answer from Eric Olson on Stack Overflow
Discussions

validation - Tool to generate JSON schema from JSON data - Stack Overflow
We have this json schema draft. I would like to get a sample of my JSON data and generate a skeleton for the JSON schema, that I can rework manually, adding things like description, required, etc, ... More on stackoverflow.com
๐ŸŒ stackoverflow.com
Automatic fake JSON data creation from schema
I'm new to Python. Is this just like "Lorem Ipsum" filler content to make JSON's with to test software pipelines with? More on reddit.com
๐ŸŒ r/Python
10
7
January 6, 2021
JSON Schema generator
Iโ€™ve been using https://github.com/deepmap/oapi-codegen for this exact purpose as I found it to be the most robust. You need to convert the schemas to OpenAPI specs first though (IIRC there are tools for that) and make sure to use the correct parameters with oapi-codegen. Itโ€™s not fantastic, but it does work very well for our use case. More on reddit.com
๐ŸŒ r/golang
10
2
February 8, 2023
Python: Best Schema-from-JSON-samples generator?

https://github.com/Julian/jsonschema/ is a python module that supports draft03 and draft04.

https://github.com/cwacek/python-jsonschema-objects creates classes from jsonschema, along with loading JSON into them and associated validation. I haven't found a way to give it a list of unrelated schema and emit many classes in one shot, though.

On the interactive web-service end of things, http://jsonschema.net/ does a pretty reasonable job.

More on reddit.com
๐ŸŒ r/Python
1
1
December 30, 2014
๐ŸŒ
Js
json-schema-faker.js.org
JSON Schema Faker โ€“ Generate Realistic Test Data
Generate valid JSON data from JSON Schema definitions.
๐ŸŒ
ExtendsClass
extendsclass.com โ€บ json-schema-validator.html
Online JSON Schema Validator and Generator
Step 1: Fill "JSON Schema" editor. You can Drag and drop a JSON file, click on "Browse a JSON file"or directly type in the editor. Step 2: You can choose the options (below the editor). If you check "Only required" then only the required fields will be filled in the generated JSON.
๐ŸŒ
Mockaroo
mockaroo.com
Mockaroo - Random Data Generator and API Mocking Tool | JSON / CSV / SQL / Excel
Generate DataPreview ยท Save As... Derive from Example... More ยท Schemas ยท Datasets ยท APIs ยท Scenarios ยท Projects ยท Functions ยท Databases ยท De-Identify ยท Downloads ยท Sign In ยท Projects ยท Functions ยท Community Forum ยท API Reference ยท Mock APIs ยท Tutorials ยท FAQ ยท About ยท Pricing ยท Request a Quote ยท Contact Support ยท Clone this Schema ยท Import from Excel/CSV header... Import from JSON schema...
๐ŸŒ
GitHub
github.com โ€บ json-schema-faker โ€บ json-schema-faker
GitHub - json-schema-faker/json-schema-faker: JSON-Schema + fake data generators ยท GitHub
1 month ago - import { generate } from "json-schema-faker"; const data = await generate({ type: "object", properties: { name: { type: "string", minLength: 2 }, age: { type: "integer", minimum: 0, maximum: 120 }, email: { type: "string", format: "email" }, tags: { type: "array", items: { type: "string" }, maxItems: 3 } }, required: ["name", "email"] });
Starred by 3.4K users
Forked by 343 users
Languages ย  JavaScript 61.7% | HTML 20.0% | TypeScript 15.8% | CSS 2.3% | Makefile 0.2%
๐ŸŒ
Visual Studio Marketplace
marketplace.visualstudio.com โ€บ items
JSON Schema Tools - Visual Studio Marketplace
Extension for Visual Studio - Allows you to easily generate a schema file from a JSON file and generate a JSON file with dummy data based on a schema file.
Find elsewhere
๐ŸŒ
json-everything
docs.json-everything.net โ€บ schema โ€บ datagen โ€บ schema-datagen
Generating Sample JSON Data from a Schema | json-everything
3 weeks ago - JsonSchema.Net.DataGeneration is a tool that can create JSON data instances using a JSON schema as a framework.
๐ŸŒ
Domsignal
domsignal.com โ€บ home โ€บ json schema generator | create schemas for your data with ease
JSON Schema Generator | Create Schemas for Your Data with Ease
Using Domsignal JSON Schema Generator, you can generate JSON schema in a snap. Just enter your JSON file or JSON code in the source panel, and the JSON SChema Generator will generate JSON Schema without any manual effort from your side.
๐ŸŒ
Jsonld
jsonld.com โ€บ home โ€บ json-ld generator
JSON-LD Schema Generator | JSON-LD Schema Generator Tool
April 12, 2024 - We've redeveloped our JSON-LD schema markup generator tool from the ground up and currently have 3 different types which generates valid JSON-LD markup.
๐ŸŒ
Reddit
reddit.com โ€บ r/python โ€บ automatic fake json data creation from schema
r/Python on Reddit: Automatic fake JSON data creation from schema
January 6, 2021 -

https://github.com/ghandic/jsf

Use jsf along with fake data generators to provide consistent and meaningful fake data for your system.

Main Features

  • Provides out of the box data generation from any JSON schema ๐Ÿ“ฆ

  • Extendable custom data providers using any lambda functions ๐Ÿ”—

  • Multi level state for dependant data (eg multiple objects sharing value, such as children with same surname) ๐Ÿค“

  • Inbuilt validation of fake JSON produced โœ…

  • In memory conversion from JSON Schema to Pydantic Models with generated examples ๐Ÿคฏ

  • Seamless integration with FastAPI ๐Ÿš€

Installation

$ pip install jsf

---> 100%

Usage

Basic ๐Ÿ˜Š

from jsf import JSF

faker = JSF(
    {
        "type": "object",
        "properties": {
            "name": {"type": "string", "$provider": "faker.name"},
            "email": {"type": "string", "$provider": "faker.email"},
        },
        "required": ["name", "email"],
    }
)

fake_json = faker.generate()

Results in ...

{
    'name': 'Jesse Phillips', 
    'email': 'xroberson@hotmail.com'
}

From JSON file ๐Ÿ“

from jsf import JSF

faker = JSF.from_json("demo-schema.json")
fake_json = faker.generate()

<details markdown="1"> <summary>Or run stright from the <code>commandline</code>...</summary>

Native install

jsf --schema src/tests/data/custom.json --instance wow.json

Docker

docker run -v $PWD:/data challisa/jsf jsf --schema /data/custom.json --instance /data/example.json

</details>

FastAPI Integration ๐Ÿš€

Create a file main.py with:

from jsf import JSF
from fastapi import FastAPI

app = FastAPI(docs_url="/")
generator = JSF.from_json("custom.json")


@app.get("/generate", response_model=generator.pydantic())
def read_root():
    return generator.generate()

Run the server with:

<div class="termy">

$ uvicorn main:app --reload

INFO:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
INFO:     Started reloader process [28720]
INFO:     Started server process [28722]
INFO:     Waiting for application startup.
INFO:     Application startup complete.

Navigate to http://127.0.0.1:8000 and check out your endpoint. Notice the following are all automatically created:

  • Schema with descriptions and examples

  • Example response

  • Data generation by clicking "try it out"

๐ŸŒ
Workik
workik.com โ€บ ai-powered-json-generator
FREE AI-Powered JSON Generator - Create JSON Schemas | Workik
Personalize your JSON creation by adding any of these contexts. You can connect to GitHub, GitLab, or Bitbucket repos; include relevant database schema, list required fields, their data types, any default values, relevant API blueprints, and more. Utilize Workik's AI to generate, validate, and optimize JSON schemas.
๐ŸŒ
Altova
altova.com โ€บ xmlspy-xml-editor โ€บ json_schema_editor
JSON Schema Editor and Generator | Altova
XMLSpy includes an enterprise-grade JSON Schema generator and graphical JSON schema editor that lets you create JSON Schemas, convert XSD to JSON Schema, generate JSON Schema, and even generate a JSON instance from a schema.
๐ŸŒ
Liquid Technologies
liquid-technologies.com โ€บ json-sample-builder
JSON Sample Generator
Generates Sample JSON data from a JSON Schema. Ideal for creating test data or prototyping. Simple GUI wizard makes it quick and easy to use. Features of the Sample JSON Generator include options to control the size of the generated document ...
๐ŸŒ
GitHub
github.com โ€บ jimblackler โ€บ jsongenerator
GitHub - jimblackler/jsongenerator: A JSON data generator from JSON Schemas, provided as a Java library.
import java.util.Random; import net.jimblackler.jsonschemafriend.Schema; import net.jimblackler.jsonschemafriend.SchemaStore; public class JsonGenerationExample { /** * Generate random Json with the following schema: * { * "type": "object", * "properties": { * "name": { "type": "string" }, * "birthday": { "type": "string","format": "date" }, * "age": { "type": "integer" } * } * } */ public static void main(String[] args) throws Exception { Configuration config = DefaultConfig.build() .setGenerateMinimal(false) .setNonRequiredPropertyChance(0.5f) .get(); SchemaStore schemaStore = new SchemaStor
Starred by 38 users
Forked by 9 users
Languages ย  Java 99.4% | JavaScript 0.6% | Java 99.4% | JavaScript 0.6%
๐ŸŒ
Newtonsoft
newtonsoft.com โ€บ jsonschema โ€บ help โ€บ html โ€บ GeneratingSchemas.htm
Generating Schemas
Schema generation is performed by the JSchemaGenerator object. It maps .NET objects, collections, properties, and their attributes to their JSON Schema equivalent.
๐ŸŒ
Nextjson
nextjson.com โ€บ json-schema-to-json
JSON Schema To JSON Online - NextJSON
This tool converts a JSON Schema into sample JSON data. It reads your schema's structure and types, then generates valid JSON that conforms to that schema.
๐ŸŒ
JSON Generator
json-generator.com
JSON Generator โ€“ Tool for generating random data
Generate any random data you want with power of agile templates and save it to our servers for later use.
๐ŸŒ
Stoplight
stoplight.io โ€บ json-guide
JSON Schema & Validator | JSON Generator & Editor Guide | Stoplight
While JSON is a compact, flexible data format, consumers of a JSON API want to expect certain fields in the responses. OpenAPI provides that expectationโ€”which some refer to as an "API contract." In the above example, we know that every todo will always include id, name, and completed. Optionally, it may also include a completed_at timestamp. OpenAPI helps you describe all aspects of your APIs. Another related format, JSON Schema, is dedicated to the objects within an API or any other place JSON is used.