{"id":18834610,"url":"https://github.com/gkovacs/lson","last_synced_at":"2025-04-14T04:32:32.461Z","repository":{"id":25327273,"uuid":"28754313","full_name":"gkovacs/lson","owner":"gkovacs","description":"LSON: LiveScript Object Notation Parser","archived":false,"fork":false,"pushed_at":"2015-01-03T22:09:28.000Z","size":148,"stargazers_count":5,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-27T19:13:22.714Z","etag":null,"topics":["json","livescript","lson"],"latest_commit_sha":null,"homepage":"","language":"LiveScript","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/gkovacs.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":"2015-01-03T20:49:33.000Z","updated_at":"2021-09-04T02:04:53.000Z","dependencies_parsed_at":"2022-08-24T02:30:41.044Z","dependency_job_id":null,"html_url":"https://github.com/gkovacs/lson","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gkovacs%2Flson","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gkovacs%2Flson/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gkovacs%2Flson/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gkovacs%2Flson/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gkovacs","download_url":"https://codeload.github.com/gkovacs/lson/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248822071,"owners_count":21166997,"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":["json","livescript","lson"],"created_at":"2024-11-08T02:13:24.146Z","updated_at":"2025-04-14T04:32:32.158Z","avatar_url":"https://github.com/gkovacs.png","language":"LiveScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LSON: LiveScript Object Notation Parser\n\nSame API as the JSON module, but for [LiveScript](http://livescript.net/) objects. Also supports CSON and JSON (since LSON is a superset of them).\n\nUses the LiveScript parser to do the actual parsing. Will not execute code.\n\n## Install\n\n    npm install lson\n\n## API\n\nlson.parse: Given a string, returns an object.\n\nlson.parseFile: Given a filename (extensions .lson and .json.ls are common), reads and parses it synchronously, and returns an object\n\nlson.stringify: Given an object, returns a string (currently outputs pretty-printed JSON).\n\n## LSON format\n\nLSON is a superset of JSON and CSON. Here is an example:\n\n```livescript\nan_array: \u003c[ an array of strings ]\u003e\nanother_array: [\n  'another'\n  'array'\n]\n# we can even have comments\na_dict: {\n  key: 'value'\n}\na_string: 'some string'\nanother_string: \\anotherstring\n```\n\nThis corresponds to the following JSON:\n\n```javascript\n{\n  \"an_array\": [\n    \"an\",\n    \"array\",\n    \"of\",\n    \"strings\"\n  ],\n  \"another_array\": [\n    \"another\",\n    \"array\"\n  ],\n  \"a_dict\": {\n    \"key\": \"value\"\n  },\n  \"a_string\": \"some string\",\n  \"another_string\": \"anotherstring\"\n}\n```\n\n## Example\n\n```livescript\nlson = require('lson')\n\nparsed = lson.parse('''\nan_array: \u003c[ an array of strings ]\u003e\nanother_array: [\n  'another'\n  'array'\n]\n# we can even have comments\na_dict: {\n  key: 'value'\n}\na_string: 'some string'\nanother_string: \\\\anotherstring\n''')\n\nconsole.log(lson.stringify(parsed))\n```\n\n## Licence\n\nMIT\n\n## Credits\n\nAuthor: [Geza Kovacs](https://github.com/gkovacs)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgkovacs%2Flson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgkovacs%2Flson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgkovacs%2Flson/lists"}