{"id":28793020,"url":"https://github.com/cdapio/ui-schema-parser","last_synced_at":"2026-01-20T17:34:14.552Z","repository":{"id":57195466,"uuid":"75244712","full_name":"cdapio/ui-schema-parser","owner":"cdapio","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-13T01:55:48.000Z","size":2638,"stargazers_count":0,"open_issues_count":9,"forks_count":5,"subscribers_count":43,"default_branch":"develop","last_synced_at":"2025-06-12T11:04:34.306Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/cdapio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.rst","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":"2016-12-01T01:54:08.000Z","updated_at":"2019-09-23T12:14:22.000Z","dependencies_parsed_at":"2024-06-19T20:03:06.306Z","dependency_job_id":"01b6a8c0-1079-42ab-a032-44dc7b9d9121","html_url":"https://github.com/cdapio/ui-schema-parser","commit_stats":null,"previous_names":["caskdata/ui-schema-parser"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cdapio/ui-schema-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdapio%2Fui-schema-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdapio%2Fui-schema-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdapio%2Fui-schema-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdapio%2Fui-schema-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cdapio","download_url":"https://codeload.github.com/cdapio/ui-schema-parser/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdapio%2Fui-schema-parser/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260465874,"owners_count":23013443,"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":[],"created_at":"2025-06-18T01:04:13.745Z","updated_at":"2026-01-20T17:34:14.547Z","avatar_url":"https://github.com/cdapio.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Avsc\n\n### NOTE:\n  This is a clone of [mtth/avsc](https://github.com/mtth/avsc) repo.\n\n  The reason we have a separate repo is because [CDAP](github.com/caskdata/cdap) supports avro-based schemas which has subtle changes (relaxed rules)\n\n  * Map can support complex types\n  * Names can have `-` (hyphens).\n\nSo this repo adds those rules to the parser\n\nPure JavaScript implementation of the [Avro\nspecification](https://avro.apache.org/docs/current/spec.html).\n\n\n## Features\n\n+ Blazingly [fast and compact][benchmarks] serialization! Typically faster than\n  JSON with much smaller encodings.\n+ All the Avro goodness and more: [type inference][type-inference], [schema\n  evolution][schema-evolution], and [remote procedure calls][rpc].\n+ Support for [serializing arbitrary JavaScript objects][logical-types].\n+ Unopinionated [64-bit integer compatibility][custom-long].\n\n\n## Installation\n\n```bash\n$ npm install cdap-avsc\n```\n\n`avsc` is compatible with all versions of [node.js][] since `0.11` and major\nbrowsers via [browserify][] (see the full compatibility table\n[here][browser-support]). For convenience, you can also find compiled\ndistributions with the [releases][] (but please host your own copy).\n\n\n## Documentation\n\n+ [Home][home]\n+ [API](https://github.com/mtth/avsc/wiki/API)\n+ [Quickstart](https://github.com/mtth/avsc/wiki/Quickstart)\n+ [Advanced usage](https://github.com/mtth/avsc/wiki/Advanced-usage)\n+ [Benchmarks][benchmarks]\n\n\n## Examples\n\nInside a node.js module, or using browserify:\n\n```javascript\nconst avro = require('cdap-avsc');\n```\n\n+ Encode and decode values from a known schema:\n\n  ```javascript\n  const type = avro.parse({\n    name: 'Pet',\n    type: 'record',\n    fields: [\n      {name: 'kind', type: {name: 'Kind', type: 'enum', symbols: ['CAT', 'DOG']}},\n      {name: 'name', type: 'string'}\n    ]\n  });\n  const buf = type.toBuffer({kind: 'CAT', name: 'Albert'}); // Encoded buffer.\n  const val = type.fromBuffer(buf); // {kind: 'CAT', name: 'Albert'}\n  ```\n\n+ Infer a value's type and encode similar values:\n\n  ```javascript\n  const val = {city: 'Cambridge', zipCodes: ['02138', '02139'], visits: 2};\n  const type = avro.infer(val);\n  // We can now encode the value:\n  const buf = type.toBuffer(val);\n  // And also any values with a matching structure:\n  const bufs = [\n    type.toBuffer({city: 'Seattle', zipCodes: ['98101'], visits: 3}),\n    type.toBuffer({city: 'NYC', zipCodes: [], visits: 0})\n  ];\n  ```\n\n+ Get a [readable stream][readable-stream] of decoded values from an Avro\n  container file:\n\n  ```javascript\n  avro.createFileDecoder('./values.avro')\n    .on('metadata', (type) =\u003e { /* `type` is the writer's type. */ })\n    .on('data', (val) =\u003e { /* Do something with the decoded value. */ });\n  ```\n\n+ Implement a TCP server for an [IDL-defined][idl] protocol:\n\n  ```javascript\n  avro.assemble('./Ping.avdl', (err, attrs) =\u003e {\n    // Generate the protocol and attach a handler for `ping` messages:\n    const protocol = avro.parse(attrs)\n      .on('ping', (req, ee, cb) =\u003e {\n        cb(null, 'pong');\n      });\n    // Respond on any incoming connection:\n    require('net').createServer()\n      .on('connection', (con) =\u003e {\n        protocol.createListener(con);\n      })\n      .listen(8000);\n  });\n  ```\n\n\n[node.js]: https://nodejs.org/en/\n[benchmarks]: https://github.com/mtth/avsc/wiki/Benchmarks\n[type-inference]: https://github.com/mtth/avsc/wiki/Advanced-usage#type-inference\n[schema-evolution]: https://github.com/mtth/avsc/wiki/Advanced-usage#schema-evolution\n[logical-types]: https://github.com/mtth/avsc/wiki/Advanced-usage#logical-types\n[custom-long]: https://github.com/mtth/avsc/wiki/Advanced-usage#custom-long-types\n[readable-stream]: https://nodejs.org/api/stream.html#stream_class_stream_readable\n[browserify]: http://browserify.org/\n[browser-support]: https://github.com/mtth/avsc/wiki#browser-support\n[home]: https://github.com/mtth/avsc/wiki\n[rpc]: https://github.com/mtth/avsc/wiki/Advanced-usage#remote-procedure-calls\n[releases]: https://github.com/mtth/avsc/releases\n[idl]: https://avro.apache.org/docs/current/idl.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdapio%2Fui-schema-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcdapio%2Fui-schema-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdapio%2Fui-schema-parser/lists"}