{"id":22870316,"url":"https://github.com/berquerant/randomjson","last_synced_at":"2025-10-14T17:10:34.235Z","repository":{"id":81890029,"uuid":"551376255","full_name":"berquerant/randomjson","owner":"berquerant","description":"Random json generator.","archived":false,"fork":false,"pushed_at":"2022-11-28T07:45:03.000Z","size":36,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-31T11:31:18.839Z","etag":null,"topics":["python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/berquerant.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":"2022-10-14T09:32:27.000Z","updated_at":"2022-10-16T13:45:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"c20d922d-0747-469d-b132-12d07922eb1d","html_url":"https://github.com/berquerant/randomjson","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/berquerant/randomjson","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berquerant%2Frandomjson","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berquerant%2Frandomjson/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berquerant%2Frandomjson/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berquerant%2Frandomjson/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/berquerant","download_url":"https://codeload.github.com/berquerant/randomjson/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berquerant%2Frandomjson/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279020087,"owners_count":26086805,"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","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["python"],"created_at":"2024-12-13T13:14:31.429Z","updated_at":"2025-10-14T17:10:34.200Z","avatar_url":"https://github.com/berquerant.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# randomjson\n\nGenerate random json.\n\n\n# Example\n\nexample.json:\n\n``` json\n{\n  \"schema\": {\n    \"items\": [\n      \"{{repeat}}\",\n      \"{{variable|n}}\",\n      {\n        \"user_id\": [\n          \"{{function|uuid}}\"\n        ],\n        \"action\": [\n          \"{{function|choice}}\",\n          \"{{variable|actions}}\"\n        ],\n        \"url\": [\n          \"{{function|format}}\",\n          \"{{variable|url_template}}\",\n          [\n            \"{{function|rand}}\",\n            \"{{const|100|int}}\"\n          ]\n        ],\n        \"ref\": [\n          \"{{cond}}\",\n          [\n            [\n              \"{{function|eq}}\",\n              [\n                \"{{function|rand}}\",\n                \"{{const|1|int}}\"\n              ],\n              \"{{const|1|int}}\"\n            ],\n            [\n              \"{{function|format}}\",\n              \"{{variable|ref_template}}\",\n              [\n                \"{{function|rand}}\",\n                \"{{const|100|int}}\"\n              ]\n            ]\n          ]\n        ]\n      }\n    ]\n  },\n  \"variables\": {\n    \"actions\": [\n      \"pageview\",\n      \"click\",\n      \"conversion\"\n    ],\n    \"n\": 3,\n    \"url_template\": \"https://sample{}.com\",\n    \"ref_template\": \"https://sample{}.com/ref\"\n  }\n}\n```\n\n`python -m randomjson.cli @example.json` generates below:\n\n``` json\n{\n  \"items\": [\n    {\n      \"user_id\": \"2d324eb1-0770-4444-bea8-d3de536da168\",\n      \"action\": [\n        \"conversion\"\n      ],\n      \"url\": \"https://sample3.com\"\n    },\n    {\n      \"user_id\": \"526a4ca9-6b5a-483f-9869-8935c5524408\",\n      \"action\": [\n        \"pageview\"\n      ],\n      \"url\": \"https://sample16.com\"\n    },\n    {\n      \"user_id\": \"7f2b8a89-cf75-4316-9152-07792b5830fc\",\n      \"action\": [\n        \"click\"\n      ],\n      \"url\": \"https://sample85.com\",\n      \"ref\": \"https://sample49.com/ref\"\n    }\n  ]\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fberquerant%2Frandomjson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fberquerant%2Frandomjson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fberquerant%2Frandomjson/lists"}