{"id":18790154,"url":"https://github.com/monsterkodi/noon","last_synced_at":"2025-04-13T14:07:05.058Z","repository":{"id":65411456,"uuid":"47438984","full_name":"monsterkodi/noon","owner":"monsterkodi","description":"no ordinary object notation","archived":false,"fork":false,"pushed_at":"2025-02-28T22:36:48.000Z","size":1800,"stargazers_count":9,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-13T14:06:59.473Z","etag":null,"topics":["data-format","noon","object-notation","serialization"],"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/monsterkodi.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-12-05T02:35:40.000Z","updated_at":"2025-02-28T22:36:51.000Z","dependencies_parsed_at":"2024-06-19T01:29:40.883Z","dependency_job_id":"7a09be15-e650-4213-b858-43d938dea639","html_url":"https://github.com/monsterkodi/noon","commit_stats":{"total_commits":291,"total_committers":3,"mean_commits":97.0,"dds":0.01718213058419249,"last_synced_commit":"4531e563719d20fbbdad5cb96584ba54c6154cd2"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monsterkodi%2Fnoon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monsterkodi%2Fnoon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monsterkodi%2Fnoon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monsterkodi%2Fnoon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/monsterkodi","download_url":"https://codeload.github.com/monsterkodi/noon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248724639,"owners_count":21151561,"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":["data-format","noon","object-notation","serialization"],"created_at":"2024-11-07T21:10:08.994Z","updated_at":"2025-04-13T14:07:05.051Z","avatar_url":"https://github.com/monsterkodi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n![Logo](https://raw.githubusercontent.com/monsterkodi/noon/master/img/icon.png)\n![noon](https://raw.githubusercontent.com/monsterkodi/noon/master/img/noon.png)\n\n### noon\n\nis an object notation with a focus on human readability.\n\nWhitespace is preferred over other control characters:\n\n- Indentation is used to express hierarchy\n- Strings don't need to be escaped\n    - works well in config files\n    - works well in [command line arguments](https://github.com/monsterkodi/colorcat/blob/master/test/test.sh)\n    - good for storing [regexp patterns](https://github.com/monsterkodi/ko/blob/master/syntax/ko.noon)\n    \n### example files\n\n* [package](https://github.com/monsterkodi/noon/blob/master/package.noon)\n* [language](https://github.com/monsterkodi/language-noon/blob/master/grammars/noon.noon)\n* [font](https://github.com/monsterkodi/salter/blob/master/font.noon)\n* [menu](https://github.com/monsterkodi/kaligraf/blob/master/coffee/menu.noon)\n\n### format\n\n#### hierarchy\n\nis expressed by indentation with spaces\n\n```\ngrandpa\n    parent\n        child\n        sibling\n    uncle\n```\n\n#### dictionaries\n\ntwo or more spaces mark the end of a dictionary key, therefore ...  \nkeys and list items can have single spaces in them but ...  \nunescaped dictionary keys can't contain consecutive spaces:\n\n```\nkey 1    value 1\nkey 2    value 2 contains    spaces\n```   \n\n#### one key makes an object\n\n```\nthis is\nan   object\n```\n\nthe above as json: `{\"this is\": null, \"an\": \"object\"}`  \nwhile \n\n```\nthis is\nnot an object\n``` \n\nis equivalent to `[\"this is\", \"not an object\"]`\n\n#### objects inside lists \n\nare expressed like this:\n```\n.\n    a  1\n.\n    b  2\n```\nthe above as json: `[{\"a\": 1}, {\"b\": 2}]`\n\n### strings\n\n#### escaping\n\nif trimming your strings is not an option, you can escape:\n\n```\na             |  leading spaces\nb             trailing spaces  |\nc             |  leading and trailing spaces  |\npipe symbol   |||\nempty string  ||\n```     \n\nkeys must be escaped from both ends:\n\n```\n| s  pace |  key keeps spaces\n|    |       key consists of spaces\n||           key is empty string\n```   \n\n#### multiline strings\n\n```\nkey  ...\nvalue is\na text with\nline breaks\nwhich stops\nnow\n...  \n```\n\n#### comments\n\n```coffeescript\n# comments start with the hash sign\n# mixing of data and comments is not allowed\ntherefore:\n    1 # this is not a comment\n    | # neither is this one\n      # but this one is \n```\n\n### inline\n\nsometimes data needs to be encoded in a single line. \n\n#### dense notation\n\n```\nkey  . a .. b . c\n```\n\nis equivalent to\n\n```\nkey\n    a\n        b\n    c\n```\n\n#### one line notation\n\n**::** represents a line break  \nno spaces in keys allowed, therefore ...  \nno two-space-seperation necessary:\n\n```\nkey . a :: b . c :: d 1 :: e 2\n```\n\nis equivalent to\n\n```\nkey\n    a\nb\n    c\nd   1\ne   2\n```\n\n### command line\n\n![cli](./img/cli.png)\n\n### module\n\n```coffeescript\nnoon = require 'noon'\n\n# usage is similar to JSON \n\nnoon.stringify { hello: 'world' }\n\n# hello    world\n\nnoon.parse \"\"\"\nhello         world\nwhat's up?    ☺\n\"\"\"\n\n# { hello: 'world', 'what\\'s up?': '☺' }\n\nstringify_options =   # stringify's second argument, defaults are: \n    ext:      'noon'  # output format: noon or json\n    indent:   4       # number of spaces per indent level\n    align:    true    # vertically align object values\n    maxalign: 32      # maximal number of spaces when aligning\n    sort:     false   # sort object keys alphabetically\n    circular: false   # check for circular references (expensive!)\n    colors:   false   # colorize output with ansi colors\n    \n```\n\n```coffeescript\n\n# load data from file \n\ndata = noon.load 'file.noon' \ndata = noon.load 'file.json'\n\n# write data to file\n\nnoon.save 'file.noon', data\n\nnoon.save 'file.noon', data, stringify_options\nnoon.save 'file.json', data  # \u003c write as json\nnoon.save 'noext', data, ext: 'noon'\n\n```\n\n### caveats\n\n- keys can't start with the pipe symbol: |\n- escaped keys can't contain the pipe symbol\n- empty objects are not expressible\n\nDon't use it if you can't live with the limitations mentioned above.  \n\n[![npm package][npm-image]][npm-url] \n[![downloads][downloads-image]][downloads-url] \n\n[npm-image]:https://img.shields.io/npm/v/noon.svg\n[npm-url]:http://npmjs.org/package/noon\n[downloads-image]:https://img.shields.io/npm/dm/noon.svg\n[downloads-url]:https://www.npmtrends.com/noon\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonsterkodi%2Fnoon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmonsterkodi%2Fnoon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonsterkodi%2Fnoon/lists"}