{"id":15588596,"url":"https://github.com/hopsoft/kvn","last_synced_at":"2025-04-24T05:18:52.460Z","repository":{"id":56880598,"uuid":"54942193","full_name":"hopsoft/kvn","owner":"hopsoft","description":"KVN (Key/Value Notation) converter \u0026 parser","archived":false,"fork":false,"pushed_at":"2020-08-20T21:50:02.000Z","size":20,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-10T02:17:02.197Z","etag":null,"topics":["data-structures","deserialization","key-value","ruby","serialization"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hopsoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-29T03:13:27.000Z","updated_at":"2020-09-24T19:48:06.000Z","dependencies_parsed_at":"2022-08-20T23:40:22.946Z","dependency_job_id":null,"html_url":"https://github.com/hopsoft/kvn","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hopsoft%2Fkvn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hopsoft%2Fkvn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hopsoft%2Fkvn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hopsoft%2Fkvn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hopsoft","download_url":"https://codeload.github.com/hopsoft/kvn/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250566650,"owners_count":21451266,"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-structures","deserialization","key-value","ruby","serialization"],"created_at":"2024-10-02T22:40:46.668Z","updated_at":"2025-04-24T05:18:52.435Z","avatar_url":"https://github.com/hopsoft.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Lines of Code](http://img.shields.io/badge/lines_of_code-144-brightgreen.svg?style=flat)](http://blog.codinghorror.com/the-best-code-is-no-code-at-all/)\n[![Maintainability](https://api.codeclimate.com/v1/badges/8c94848444b6afc448b8/maintainability)](https://codeclimate.com/github/hopsoft/kvn/maintainability)\n[![Build Status](http://img.shields.io/travis/hopsoft/kvn.svg?style=flat)](https://travis-ci.org/hopsoft/kvn)\n[![Coverage Status](https://img.shields.io/coveralls/hopsoft/kvn.svg?style=flat)](https://coveralls.io/r/hopsoft/kvn?branch=master)\n[![Downloads](http://img.shields.io/gem/dt/kvn.svg?style=flat)](http://rubygems.org/gems/kvn)\n\n# KVN (kĕ'vĭn)\n\n## Key/Value Notation\n\n```\nname:kvn; pronunciation:kĕ'vĭn; summary:Key/Value Notation;\n```\n\nSimilar to JSON but narrower in scope.\nRepresents basic key/value data structures as legible strings.\nUseful when working with limited storage options to capture complex data in a single field.\n\n## Rules\n\n* Key \u0026 value are delimited with a colon `:`\n* Key/value pairs are delimited with a semicolon `;`\n* Colons \u0026 semicolons are reserved \u0026 are prohibited in keys \u0026 values\n* Data structures should be flat\u0026mdash; 1 level deep, no nesting\n* Keys \u0026 values are limited to primitive types\n  * Boolean\n  * String\n  * Numeric\n* Keys are sorted alphabetically\n\n## Examples\n\n### Convert a Hash to a KVN string\n\n```ruby\ndata = { d: \"example with whitespace\", a: true, c: \"example\", b: 1, e: nil }\nKvn::Converter.new(data).convert\n# =\u003e \"a:true; b:1; c:example; d:example with whitespace; e:null;\"\n```\n\n### Parse a KVN string into a Hash\n\n```ruby\nvalue = \"a:true; b:1; c:example; d:example with whitespace; e:null;\"\nKvn::Parser.new(value).parse\n# =\u003e {\"a\"=\u003etrue, \"b\"=\u003e1, \"c\"=\u003e\"example\", \"d\"=\u003e\"example with whitespace\", \"e\"=\u003enil}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhopsoft%2Fkvn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhopsoft%2Fkvn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhopsoft%2Fkvn/lists"}