{"id":19655730,"url":"https://github.com/ryanpcmcquen/propertiestojson","last_synced_at":"2025-08-03T19:32:14.004Z","repository":{"id":46331515,"uuid":"120373588","full_name":"ryanpcmcquen/propertiesToJSON","owner":"ryanpcmcquen","description":"Convert Java .properties files to JSON (using JavaScript).","archived":false,"fork":false,"pushed_at":"2021-10-30T10:46:45.000Z","size":30,"stargazers_count":13,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-03T18:35:11.451Z","etag":null,"topics":["hacktoberfest","java","javascript","json"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/properties-to-json","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ryanpcmcquen.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-02-05T23:07:05.000Z","updated_at":"2023-03-14T15:44:24.000Z","dependencies_parsed_at":"2022-09-05T19:10:20.706Z","dependency_job_id":null,"html_url":"https://github.com/ryanpcmcquen/propertiesToJSON","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanpcmcquen%2FpropertiesToJSON","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanpcmcquen%2FpropertiesToJSON/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanpcmcquen%2FpropertiesToJSON/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanpcmcquen%2FpropertiesToJSON/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryanpcmcquen","download_url":"https://codeload.github.com/ryanpcmcquen/propertiesToJSON/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224126562,"owners_count":17260065,"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":["hacktoberfest","java","javascript","json"],"created_at":"2024-11-11T15:23:30.393Z","updated_at":"2024-11-11T15:23:31.702Z","avatar_url":"https://github.com/ryanpcmcquen.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Convert Java `.properties` files to JSON (using JavaScript).\n\nThe function `propertiesToJSON` takes a string and returns\na JavaScript object.\n\n### Read a local file in `node`:\n\n```js\nconst fs = require(\"fs\");\nconst path = require(\"path\");\nconst filePath = path.join(__dirname, \"sample.properties\");\nconst propertiesToJSON = require(\"properties-to-json\");\n\nfs.readFile(filePath, { encoding: \"utf-8\" }, (err, data) =\u003e {\n    if (!err) {\n        console.log(propertiesToJSON(data));\n    }\n});\n```\n\n### Read a remote file in the browser:\n\n```js\nconst propertiesToJSON = require(\"properties-to-json\");\n\nconst propsFile = new Request(\n    \"https://gitcdn.link/repo/ryanpcmcquen/propertiesToJSON/master/sample.properties\"\n);\n\nconst props = fetch(propsFile)\n    .then((response) =\u003e {\n        return response.text();\n    })\n    .then((text) =\u003e {\n        const propsText = propertiesToJSON(text);\n        console.log(propsText);\n        return propsText;\n    });\n```\n\n### How do I get it?\n\n1. `yarn add properties-to-json`\n2. Profit.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanpcmcquen%2Fpropertiestojson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryanpcmcquen%2Fpropertiestojson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanpcmcquen%2Fpropertiestojson/lists"}