{"id":15013035,"url":"https://github.com/jimblackler/jsongenerator","last_synced_at":"2025-04-12T04:21:13.497Z","repository":{"id":40550080,"uuid":"293358519","full_name":"jimblackler/jsongenerator","owner":"jimblackler","description":"A JSON data generator from JSON Schemas, provided as a Java library.","archived":false,"fork":false,"pushed_at":"2023-10-06T21:09:15.000Z","size":161,"stargazers_count":31,"open_issues_count":5,"forks_count":10,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T23:51:19.543Z","etag":null,"topics":["json","jsonschema"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jimblackler.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-06T20:42:15.000Z","updated_at":"2025-03-09T20:44:24.000Z","dependencies_parsed_at":"2024-10-14T03:40:23.622Z","dependency_job_id":"d215ff2e-a9eb-45e2-ad6a-b4abbeae76c1","html_url":"https://github.com/jimblackler/jsongenerator","commit_stats":{"total_commits":99,"total_committers":5,"mean_commits":19.8,"dds":"0.13131313131313127","last_synced_commit":"b8713027569cd5f76448a6e793000f1a39540163"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimblackler%2Fjsongenerator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimblackler%2Fjsongenerator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimblackler%2Fjsongenerator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimblackler%2Fjsongenerator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jimblackler","download_url":"https://codeload.github.com/jimblackler/jsongenerator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248514412,"owners_count":21116961,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["json","jsonschema"],"created_at":"2024-09-24T19:43:38.299Z","updated_at":"2025-04-12T04:21:13.475Z","avatar_url":"https://github.com/jimblackler.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JSON Generator\n\nA JSON data generator from JSON Schemas, provided as a Java library.\n\nIt is available on JitPack.\n[![](https://jitpack.io/v/net.jimblackler/jsongenerator.svg)](https://jitpack.io/#net.jimblackler/jsongenerator)\n\nAn online demonstration [is here](https://tryjsonschematypes.appspot.com/#generate).\n\n## How to Use\n\n```java\nimport java.util.Random;\nimport net.jimblackler.jsonschemafriend.Schema;\nimport net.jimblackler.jsonschemafriend.SchemaStore;\n\npublic class JsonGenerationExample {\n\n  /**\n   * Generate random Json with the following schema:\n   * {\n   *   \"type\": \"object\",\n   *   \"properties\": {\n   *     \"name\": { \"type\": \"string\" },\n   *     \"birthday\": { \"type\": \"string\",\"format\": \"date\" },\n   *     \"age\": { \"type\": \"integer\" }\n   *   }\n   * }\n   */\n  public static void main(String[] args) throws Exception {\n    Configuration config = DefaultConfig.build()\n        .setGenerateMinimal(false)\n        .setNonRequiredPropertyChance(0.5f)\n        .get();\n    SchemaStore schemaStore = new SchemaStore(true);\n    Schema schema = schemaStore.loadSchemaJson(\"{ \\\"type\\\": \\\"object\\\", \\\"properties\\\": { \\\"name\\\": { \\\"type\\\": \\\"string\\\" }, \\\"birthday\\\": { \\\"type\\\": \\\"string\\\", \\\"format\\\": \\\"date\\\" }, \\\"age\\\": { \\\"type\\\": \\\"integer\\\" } } }\");\n    Generator generator = new Generator(config, schemaStore, new Random());\n    Object json = generator.generate(schema, 10);\n\n    // sample output: {name=vxtydd, birthday=2377-03-08, age=544}\n    System.out.println(json);\n  }\n\n}\n```\n\n## License\nWritten by jimblackler@gmail.com and offered under an Apache 2.0 license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjimblackler%2Fjsongenerator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjimblackler%2Fjsongenerator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjimblackler%2Fjsongenerator/lists"}