{"id":28995077,"url":"https://github.com/axiscommunications/jsontas","last_synced_at":"2025-06-25T04:06:29.512Z","repository":{"id":39996407,"uuid":"274872884","full_name":"AxisCommunications/jsontas","owner":"AxisCommunications","description":"JSONTas is a tool for generating dynamic JSON data","archived":false,"fork":false,"pushed_at":"2022-05-19T11:26:06.000Z","size":73,"stargazers_count":5,"open_issues_count":3,"forks_count":4,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-06-14T09:04:51.228Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/AxisCommunications.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null}},"created_at":"2020-06-25T09:07:49.000Z","updated_at":"2022-05-19T12:42:45.000Z","dependencies_parsed_at":"2022-09-02T12:43:58.145Z","dependency_job_id":null,"html_url":"https://github.com/AxisCommunications/jsontas","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/AxisCommunications/jsontas","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AxisCommunications%2Fjsontas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AxisCommunications%2Fjsontas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AxisCommunications%2Fjsontas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AxisCommunications%2Fjsontas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AxisCommunications","download_url":"https://codeload.github.com/AxisCommunications/jsontas/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AxisCommunications%2Fjsontas/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261801988,"owners_count":23211664,"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":[],"created_at":"2025-06-25T04:06:28.241Z","updated_at":"2025-06-25T04:06:29.492Z","avatar_url":"https://github.com/AxisCommunications.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"=======\nJSONTas\n=======\n\nJSONTas is a tool for generating dynamic JSON data.\n\nDescription\n===========\n\nJSONTas adds conditionals and logic to JSON files in order to create dynamic JSON data depending on which dataset you supply.\n\nIt opens up the possibility to create generic tools where most of the operations are done by executing JSONTas on the data.\n\nDocumentation: https://jsontas.readthedocs.io/en/latest\n\n\nFeatures\n========\n\n- Simple yet powerful syntax.\n- HTTP requests on parse\n- Separation of environments by providing different datasets.\n\nInstallation\n============\n\nInstall the project by running:\n\n   pip install jsontas\n\nExamples\n========\n\nFirst we create two datasets. One for our 'dev' environment and one for our 'prod' environment.\n\nDataset 'dev.json'\n------------------\n\n.. code-block:: JSON\n\n   {\n      \"mode\": \"dev\",\n      \"database\": \"dev_db\"\n   }\n\n\nDataset 'prod.json'\n-------------------\n\n.. code-block:: JSON\n\n   {\n      \"mode\": \"prod\",\n      \"database\": \"prod_db\"\n   }\n\nJSONTas JSON file\n-----------------\n\nNext up, let's create our JSONTas file.\n\n.. code-block:: JSON\n\n   {\n      \"database\": {\n         \"host\": \"myawesomedb.example.com\",\n         \"database\": \"$database\"\n      },\n      \"message\": {\n         \"$condition\": {\n            \"if\": {\n               \"key\": \"$mode\",\n               \"operator\": \"$eq\",\n               \"value\": \"dev\"\n            },\n            \"then\": \"This is the DEV server.\",\n            \"else\": \"This is the PROD server.\"\n         }\n      }\n   }\n\nJSONTas execute with 'dev' dataset\n----------------------------------\n\n.. code-block:: bash\n\n   jsontas -d dev.json data.json\n\n.. code-block:: JSON\n\n   {\n      \"database\": {\n         \"host\": \"myawesomedb.example.com\",\n         \"database\": \"dev_db\"\n      },\n      \"message\": \"This is the DEV server.\"\n   }\n\nJSONTas execute with 'prod' dataset\n-----------------------------------\n\n.. code-block:: bash\n\n   jsontas -d prod.json data.json\n\n.. code-block:: JSON\n\n   {\n      \"database\": {\n         \"host\": \"myawesomedb.example.com\",\n         \"database\": \"prod_db\"\n      },\n      \"message\": \"This is the PROD server.\"\n   }\n\nThese examples only show the bare minimum.\nFor more examples look at our documentation at: https://jsontas.readthedocs.io/en/latest\n\nContribute\n==========\n\n- Issue Tracker: https://github.com/AxisCommunications/jsontas/issues\n- Source Code: https://github.com/AxisCommunications/jsontas\n\nSupport\n=======\n\nIf you are having issues, please let us know.\nEmail tobias.persson@axis.com or just write an issue.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxiscommunications%2Fjsontas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faxiscommunications%2Fjsontas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxiscommunications%2Fjsontas/lists"}