{"id":32179820,"url":"https://github.com/moxaj/mikron","last_synced_at":"2026-07-03T21:34:04.330Z","repository":{"id":62433714,"uuid":"44917742","full_name":"moxaj/mikron","owner":"moxaj","description":"mikron - a schema-based serialization library for Clojure and ClojureScript","archived":false,"fork":false,"pushed_at":"2018-11-27T19:13:02.000Z","size":3124,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-06-30T06:07:55.509Z","etag":null,"topics":["clojure","clojurescript","schema","serialization","serialization-library"],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/moxaj.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}},"created_at":"2015-10-25T16:13:06.000Z","updated_at":"2024-05-11T06:25:42.000Z","dependencies_parsed_at":"2022-11-01T21:15:39.954Z","dependency_job_id":null,"html_url":"https://github.com/moxaj/mikron","commit_stats":null,"previous_names":["moxaj/seria"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/moxaj/mikron","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moxaj%2Fmikron","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moxaj%2Fmikron/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moxaj%2Fmikron/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moxaj%2Fmikron/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moxaj","download_url":"https://codeload.github.com/moxaj/mikron/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moxaj%2Fmikron/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35102737,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-03T02:00:05.635Z","response_time":110,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["clojure","clojurescript","schema","serialization","serialization-library"],"created_at":"2025-10-21T21:18:28.001Z","updated_at":"2026-07-03T21:34:04.325Z","avatar_url":"https://github.com/moxaj.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mikron (WORK IN PROGRESS)\n\n**mikron** is a schema-based serialization library for Clojure and ClojureScript.\n\n[![Build Status](https://travis-ci.org/moxaj/mikron.svg?branch=master)](https://travis-ci.org/moxaj/mikron)\n\n## Features\n\n- great performance\n- compact serialization format\n- supports both Clojure and ClojureScript (browser and Node.js)\n- flexible and extensible schema system\n- extras goodies beyond serialization: data validation, delta encoding, random data generation\n\n## Latest version\n\n[![Clojars Project](https://img.shields.io/clojars/v/moxaj/mikron.svg)](https://clojars.org/moxaj/mikron)\n\n## Quick start\n\n**mikron** lets you define schemas and generates very efficient (de)serializing functions (among other things) for them.\n\nSuppose we have a structure which represents a game state (a **snapshot**) and has the following layout:\n- **time**: a timestamp\n- **entities**: a list of entities\n\nWhile an **entity** has the following attributes:\n- **id**: an id\n- **position**: a tuple of 2 numbers\n- **angle**: a number\n\nLet's get to work! First, require the core namespace and define our schemas:\n\n```clojure\n(require '[mikron.runtime.core :as mikron])\n\n(mikron/defschema ::entity\n  [:record {:id       :long\n            :position [:tuple [:float :float]]\n            :angle    :float}])\n\n(mikron/defschema ::snapshot\n  [:record {:time     :long\n            :entities [:list ::entity]}])\n```\n\nLet's define an example **snapshot**:\n```clojure\n(def snapshot\n  {:time     1000\n   :entities [{:id 0, :position [0 0], :angle 30}\n              {:id 1, :position [5 5], :angle 60}]})\n```\n\nOr, we could ask **mikron** to do it for us:\n```clojure\n(def snapshot (mikron/gen ::snapshot))\n```\n\nNow, we can serialize and then deserialize it (and do whatever we'd like with `packet` in-between):\n```clojure\n(def packet (mikron/pack ::snapshot snapshot))\n\n(def snapshot' (mikron/unpack ::snapshot packet))\n```\n\nHere, `snapshot'` is either `:mikron/invalid` or a valid **snapshot**. We can also double check the latter:\n```clojure\n(mikron/valid? ::snapshot snapshot')\n```\n\nThat's it in a nutshell. For more information, please check out the [wiki](https://github.com/moxaj/mikron/wiki) or the [Demo project](https://github.com/moxaj/mikron-demo).\n\n## License\n\nCopyright © 2017 Viktor Magyari\n\nDistributed under the Eclipse Public License v1.0.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoxaj%2Fmikron","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoxaj%2Fmikron","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoxaj%2Fmikron/lists"}