{"id":15713678,"url":"https://github.com/j8r/con","last_synced_at":"2025-07-25T03:15:14.231Z","repository":{"id":152029258,"uuid":"156110978","full_name":"j8r/con","owner":"j8r","description":"A simple, fast and readable JSON-compatible serialization format","archived":false,"fork":false,"pushed_at":"2020-03-14T22:26:21.000Z","size":119,"stargazers_count":23,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-12T21:56:49.104Z","etag":null,"topics":["con","crystal-lang","format"],"latest_commit_sha":null,"homepage":"https://j8r.github.io/con","language":"Crystal","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/j8r.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-04T18:14:25.000Z","updated_at":"2023-09-13T09:08:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"93100c56-452f-44b3-8e89-21db37c754b9","html_url":"https://github.com/j8r/con","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/j8r%2Fcon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j8r%2Fcon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j8r%2Fcon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j8r%2Fcon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/j8r","download_url":"https://codeload.github.com/j8r/con/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j8r%2Fcon/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259253607,"owners_count":22829145,"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":["con","crystal-lang","format"],"created_at":"2024-10-03T21:32:53.143Z","updated_at":"2025-06-11T11:18:25.523Z","avatar_url":"https://github.com/j8r.png","language":"Crystal","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CON\n\n[![Build Status](https://cloud.drone.io/api/badges/j8r/con/status.svg)](https://cloud.drone.io/j8r/con)\n[![ISC](https://img.shields.io/badge/License-ISC-blue.svg?style=flat-square)](https://en.wikipedia.org/wiki/ISC_license)\n\nCretin Object Notation - a simple, fast and readable JSON-compatible serialization format\n\nThe specifications is mostly stable, but can be subject to minor changes.\n\n## Example\n\n```hcl\nkey \"string\"\npi 3.14\nhash {\n  enable true\n  nothing nil\n}\nports [\n  22\n  1234\n  8888\n]\n```\n\n## Features\n\n- Backward compatible with JSON\n- Easy to read, fast to parse\n- Simple specifications\n\n## Documentation\n\nhttps://j8r.github.io/con\n\n## Specifications\n\nSpecification document: [SPEC.md](SPEC.md)\n\n## Usage\n\nAdd the dependency to your `shard.yml`:\n\n```yaml\ndependencies:\n  con:\n    github: j8r/con\n```\n\n\nThis object is a convenient container.\n\nA `CON::Any` can be converted back to either a CON or JSON serialized `String`\n\n\n```crystal\nrequire \"con\"\n\ncon_any = CON.parse con_data\ncon_any.to_con\n\nrequire \"json\"\ncon_any.to_json\n```\n\n`CON::PullParser` can be used to parse more efficiently, if the mapping is known in advance.\n\nSee [spec](spec) for more test examples.\n\n## Benchmarks\n\nThere are benchmarks comparing `CON` and the stdlib's `JSON` implementation\n\n`crystal run --release benchmark/*`\n\nSome results:\n\n```\n CON.parse minified 527.25k (  1.90µs) (±13.77%)  1.88kB/op        fastest\n   CON.parse pretty 501.42k (  1.99µs) (±15.08%)  1.88kB/op   1.05× slower\nJSON.parse minified 487.52k (  2.05µs) (± 9.05%)  2.08kB/op   1.08× slower\n  JSON.parse pretty 409.80k (  2.44µs) (± 9.13%)  2.08kB/op   1.29× slower\n```\n\n```\n        #to_con   1.17M (852.99ns) (± 3.51%)  320B/op        fastest\n #to_pretty_con   1.10M (908.96ns) (± 5.76%)  320B/op   1.07× slower\n       #to_json 742.97k (  1.35µs) (±14.52%)  576B/op   1.58× slower\n#to_pretty_json 612.21k (  1.63µs) (±13.04%)  848B/op   1.91× slower\n```\n\n## License\n\nCopyright (c) 2018-2019 Julien Reichardt - ISC License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj8r%2Fcon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fj8r%2Fcon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj8r%2Fcon/lists"}