{"id":17116068,"url":"https://github.com/andersevenrud/simplejsonconf","last_synced_at":"2025-07-11T07:04:50.536Z","repository":{"id":57149996,"uuid":"81738984","full_name":"andersevenrud/simplejsonconf","owner":"andersevenrud","description":"Use JSON as a configuration file","archived":false,"fork":false,"pushed_at":"2020-01-08T17:22:46.000Z","size":14,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-13T04:15:29.911Z","etag":null,"topics":["configuration","json"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andersevenrud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-12T16:15:43.000Z","updated_at":"2020-05-26T01:13:03.000Z","dependencies_parsed_at":"2022-09-03T14:52:18.427Z","dependency_job_id":null,"html_url":"https://github.com/andersevenrud/simplejsonconf","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/andersevenrud/simplejsonconf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andersevenrud%2Fsimplejsonconf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andersevenrud%2Fsimplejsonconf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andersevenrud%2Fsimplejsonconf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andersevenrud%2Fsimplejsonconf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andersevenrud","download_url":"https://codeload.github.com/andersevenrud/simplejsonconf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andersevenrud%2Fsimplejsonconf/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264752716,"owners_count":23658699,"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":["configuration","json"],"created_at":"2024-10-14T17:47:46.284Z","updated_at":"2025-07-11T07:04:50.345Z","avatar_url":"https://github.com/andersevenrud.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# simplejsonconf\n\n\u003e A simple library to manage JSON as ex. a configuration file\n\n- Expects pure JSON. Any functions etc, will be lost!\n- Copies JSON, so the data is not mutable from the outside\n- Written in ES6 (no ES5 bundle included at the moment)\n\n## Examples\n\n```javascript\nconst simplejsonconf = require('simplejsonconf')\n\n// Create a new instance with an initial tree\nconst jsonconf = simplejsonconf({\n  foo: 'bar',\n  sounds: {\n    enabled: true\n  },\n  ui: {\n    show: ['sidebar', 'footer'],\n    colors: {\n      red: '#ff0000',\n      green: '#00ff00',\n      blue: '#0000ff'\n    }\n  }\n})\n\n//\n// Gets a value\n//\n\njsonconf.get('sounds.enabled') // =\u003e true\n\njsonconf.get('ui') // =\u003e {show: ...}\n\n//\n// Sets a value\n//\n\njsonconf.set('sounds.enabled', false)\n\njsonconf.set('ui.show.0', 'new-sidebar') // Also works on arrays\n\njsonconf.push('ui.show', 'ads') // Push to arrays\n\njsonconf.set('ui.colors', {\n  white: '#ffffff'\n}, {\n  merge: true // Objects will merge by default\n})\n\njsonconf.set('ui.colors', '{\"black\":\"#000000\"}', {\n  parse: true // Input will be parsed by default\n})\n\n\n//\n// Removes an entry or value (depending on target)\n//\n\njson.remove('foo')\n\njson.remove('ui.show.0') // Also works on arrays\n\n//\n// Misc\n//\n\njsonconf.reset() // Reset to original values\n\njsonconf.reset({foo: 'bar'}) // Reset to new tree\n\njsonconf.toString() // As a JSON encoded string\n```\n\n## License\n\n```text\nBSD 2-Clause License\n\nCopyright (c) 2011-2018, Anders Evenrud \u003candersevenrud@gmail.com\u003e\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met: \n\n1. Redistributions of source code must retain the above copyright notice, this\n   list of conditions and the following disclaimer. \n2. Redistributions in binary form must reproduce the above copyright notice,\n   this list of conditions and the following disclaimer in the documentation\n   and/or other materials provided with the distribution. \n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\nON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n```\n\n## Changelog\n\n### 2.0.4\n\nAdded missing 'no key' setter support\n\n### 2.0.3\n\nSome minor improvements.\n\n### 2.0.2\n\nBugfixes and unit tests.\n\n### 2.0.1\n\nRewritten with nicer api and cleaner code overall.\n\n**Not backward compatible**\n\n### 1.0.x\n\nOriginal release.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandersevenrud%2Fsimplejsonconf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandersevenrud%2Fsimplejsonconf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandersevenrud%2Fsimplejsonconf/lists"}