{"id":2130731,"url":"https://github.com/groupon/cson-parser","last_synced_at":"2025-05-16T19:02:09.487Z","repository":{"id":14658818,"uuid":"17377198","full_name":"groupon/cson-parser","owner":"groupon","description":"Simple \u0026 safe CSON parser","archived":false,"fork":false,"pushed_at":"2023-01-07T22:18:30.000Z","size":509,"stargazers_count":133,"open_issues_count":19,"forks_count":27,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-04-12T17:46:38.206Z","etag":null,"topics":["coffeescript","cson","cson-parser","javascript","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"newrelic/rpm","license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/groupon.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-03-03T19:30:02.000Z","updated_at":"2024-10-01T16:50:00.000Z","dependencies_parsed_at":"2023-01-13T18:03:18.763Z","dependency_job_id":null,"html_url":"https://github.com/groupon/cson-parser","commit_stats":null,"previous_names":["groupon/cson-safe"],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/groupon%2Fcson-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/groupon%2Fcson-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/groupon%2Fcson-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/groupon%2Fcson-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/groupon","download_url":"https://codeload.github.com/groupon/cson-parser/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254592367,"owners_count":22097010,"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":["coffeescript","cson","cson-parser","javascript","nodejs"],"created_at":"2024-01-21T23:25:58.811Z","updated_at":"2025-05-16T19:02:09.428Z","avatar_url":"https://github.com/groupon.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"[![nlm-github](https://img.shields.io/badge/github-groupon%2Fcson--parser%2Fissues-F4D03F?logo=github\u0026logoColor=white)](https://github.com/groupon/cson-parser/issues)\n![nlm-node](https://img.shields.io/badge/node-%3E%3D10.13-blue?logo=node.js\u0026logoColor=white)\n![nlm-version](https://img.shields.io/badge/version-4.0.9-blue?logo=version\u0026logoColor=white)\n# cson-parser\n\nA minimalistic CSON parser. Offers:\n\n* A strict subset of CSON that allows only data\n* Interface is identical to JSON.{parse,stringify}\n* Does not run the code, free of intermediate string representations\n* Sane parse error messages with line/column\n* Regular Expressions are considered data and will be accepted as well\n\nIn addition of pure data it allows for simple arithmetic expressions like\naddition and multiplication.\nThis allows more readable configuration of numbers,\nthe following is a valid strict CSON file:\n\n```coffee\ncachedData:\n  refreshIntervalMs: 5 * 60 * 1000\n```\n\n## Install\n\n`npm install --save cson-parser`\n\n## Usage\n\n```coffee\nCSON = require 'cson-parser'\n# This will print { a: '123' }\nconsole.log CSON.parse \"a: '123'\"\n```\n\n## High-level APIs\n\n`cson-parser` only offers basic parsing and serialization.\nBut there are some great tools if you want more than that:\n\n* [`fs-cson`](https://github.com/charlierudolph/fs-cson), read and write CSON files\n* [`CSON`](https://github.com/bevry/cson), provides file, coffeescript, javascript handling and a CLI\n* [`season`](https://www.npmjs.org/package/season),\n  atom.io's CSON package.\n  Includes CLI tool to convert CSON to JSON\n* [`grunt-cson`](https://www.npmjs.org/package/grunt-cson),\n  converts CSON to JSON as a grunt task\n* [`load-grunt-configs`](https://www.npmjs.org/package/load-grunt-configs),\n  loads grunt config from CSON files (among other formats)\n* [`fetcher`](https://www.npmjs.org/package/fetcher),\n  a declarative way to download (frontend) libraries, supports CSON configs\n* [`csonschema`](https://www.npmjs.org/package/csonschema),\n  parses [JSON Schema](http://json-schema.org) files written in CSON\n\nYou can find more on the\n[npm website](https://preview.npmjs.com/browse/depended/cson-parser).\n\n## FAQ\n\n### Why not just use YAML?\n\nYAML allows for some pretty complex constructs like anchor and alias,\nwhich can behave in unexpected ways, especially with nested objects.\nCSON is simpler while still offering most of the niceties of YAML.\n\n### Why not just use JSON?\n\nJSON doesn't offer multi-line strings and is generally a little noisier.\nAlso sometimes it can be nice to have comments in config files.\n\n### Why not just use CoffeeScript directly?\n\nYou don't want data files being able to run arbitrary code.\nEven when ran in a proper sandbox, `while(true)` is still possible.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgroupon%2Fcson-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgroupon%2Fcson-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgroupon%2Fcson-parser/lists"}