{"id":19954033,"url":"https://github.com/mkht/dscr_jsonfile","last_synced_at":"2025-11-09T00:03:38.063Z","repository":{"id":57667040,"uuid":"140419526","full_name":"mkht/DSCR_JsonFile","owner":"mkht","description":"PowerShell DSC Resource to create JSON format file","archived":false,"fork":false,"pushed_at":"2018-10-28T06:09:54.000Z","size":30,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-12T22:07:07.907Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PowerShell","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/mkht.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}},"created_at":"2018-07-10T11:04:07.000Z","updated_at":"2018-10-28T06:09:55.000Z","dependencies_parsed_at":"2022-09-02T14:10:52.263Z","dependency_job_id":null,"html_url":"https://github.com/mkht/DSCR_JsonFile","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkht%2FDSCR_JsonFile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkht%2FDSCR_JsonFile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkht%2FDSCR_JsonFile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkht%2FDSCR_JsonFile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mkht","download_url":"https://codeload.github.com/mkht/DSCR_JsonFile/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241382621,"owners_count":19953972,"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":"2024-11-13T01:18:39.088Z","updated_at":"2025-11-09T00:03:38.002Z","avatar_url":"https://github.com/mkht.png","language":"PowerShell","readme":"DSCR_JsonFile\n====\n\n## This repository is no longer maintained ! :no_entry:\nPlease use [DSCR_FileContent](https://github.com/mkht/DSCR_FileContent/) module.\n\n----\nPowerShell DSC Resource to create JSON format file.\n\n## Install\nYou can install Resource through [PowerShell Gallery](https://www.powershellgallery.com/packages/DSCR_JsonFile/).\n```Powershell\nInstall-Module -Name DSCR_JsonFile\n```\n\n## Properties\n+ [string] **Ensure** (Write):\n    + Specify the key exists or not.\n    + The default value is `Present`. (`Present` | `Absent`)\n\n+ [string] **Path** (Key):\n    + The path of the JSON file.\n\n+ [string] **Key** (Key):\n    + Key element.\n\n+ [string] **Value** (Key):\n    + The value corresponding to the key.\n    + The value of this parameter must be a JSON formatted string.\n\n+ [string] **Encoding** (Write):\n    + You can choose text encoding for the JSON file.\n    + utf8NoBOM (default) / utf8BOM / utf32 / unicode / bigendianunicode / ascii\n\n+ [string] **NewLine** (Write):\n    + You can choose new line code for the JSON file.\n    + CRLF (default) / LF\n\n## Examples\n+ **Example 1**: Sample configuration\n```Powershell\nConfiguration Example1 {\n    Import-DscResource -ModuleName DSCR_JsonFile\n    cJsonFile String {\n        Path = 'C:\\Test.json'\n        Key = 'StringValue'\n        Value = '\"Apple\"'\n    }\n    cJsonFile Bool {\n        Path = 'C:\\Test.json'\n        Key = 'BoolValue'\n        Value = 'true'\n    }\n    cJsonFile Array {\n        Path = 'C:\\Test.json'\n        Key = \"ArrayValue\"\n        Value = '[true, 123, \"banana\"]'\n    }\n}\n```\n\nThe result of executing the above configuration, the following JSON file will output to `C:\\Test.json`\n```json\n{\n  \"BoolValue\": true,\n  \"StringValue\": \"Apple\",\n  \"ArrayValue\": [\n    true,\n    123,\n    \"banana\"\n  ]\n}\n```\n\n----\n## ChangeLog\n### 0.2.3\n + Fixed an issue that Set-TargetResource fails when the parent folder of the `Path` is not exist.\n\n### 0.2.2\n + Fix casing miss of the module name\n + Remove unnecessary files in the published package\n\n### 0.2.0\n + Initial public release\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkht%2Fdscr_jsonfile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmkht%2Fdscr_jsonfile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkht%2Fdscr_jsonfile/lists"}