{"id":15650511,"url":"https://github.com/nevillelyh/protobuf-generic","last_synced_at":"2025-08-20T06:32:03.370Z","repository":{"id":12321259,"uuid":"71588424","full_name":"nevillelyh/protobuf-generic","owner":"nevillelyh","description":"Generic protobuf manipulation","archived":false,"fork":false,"pushed_at":"2024-12-05T19:39:46.000Z","size":490,"stargazers_count":35,"open_issues_count":1,"forks_count":6,"subscribers_count":7,"default_branch":"main","last_synced_at":"2024-12-05T20:28:57.395Z","etag":null,"topics":["json","protobuf","scala"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nevillelyh.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":"2016-10-21T18:40:41.000Z","updated_at":"2024-12-05T19:39:50.000Z","dependencies_parsed_at":"2024-01-22T20:55:03.508Z","dependency_job_id":"b7fd04f6-c421-4bad-93b8-bf8f618f40aa","html_url":"https://github.com/nevillelyh/protobuf-generic","commit_stats":{"total_commits":496,"total_committers":7,"mean_commits":70.85714285714286,"dds":0.3467741935483871,"last_synced_commit":"f438fd924e029d7d4aec562c9e8d93f7320bdef0"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nevillelyh%2Fprotobuf-generic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nevillelyh%2Fprotobuf-generic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nevillelyh%2Fprotobuf-generic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nevillelyh%2Fprotobuf-generic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nevillelyh","download_url":"https://codeload.github.com/nevillelyh/protobuf-generic/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230400606,"owners_count":18219830,"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":["json","protobuf","scala"],"created_at":"2024-10-03T12:34:55.250Z","updated_at":"2024-12-19T08:07:44.752Z","avatar_url":"https://github.com/nevillelyh.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"protobuf-generic\n================\n\n[![Build Status](https://img.shields.io/github/actions/workflow/status/nevillelyh/protobuf-generic/ci.yml?branch=main)](https://github.com/nevillelyh/protobuf-generic/actions?query=workflow%3ACI)\n[![codecov.io](https://codecov.io/github/nevillelyh/protobuf-generic/coverage.svg?branch=master)](https://codecov.io/github/nevillelyh/protobuf-generic?branch=master)\n[![GitHub license](https://img.shields.io/github/license/nevillelyh/protobuf-generic.svg)](./LICENSE)\n[![Maven Central](https://img.shields.io/maven-central/v/me.lyh/protobuf-generic_2.13.svg)](https://maven-badges.herokuapp.com/maven-central/me.lyh/protobuf-generic_2.13)\n[![Scala Steward badge](https://img.shields.io/badge/Scala_Steward-helping-brightgreen.svg?style=flat\u0026logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAQCAMAAAARSr4IAAAAVFBMVEUAAACHjojlOy5NWlrKzcYRKjGFjIbp293YycuLa3pYY2LSqql4f3pCUFTgSjNodYRmcXUsPD/NTTbjRS+2jomhgnzNc223cGvZS0HaSD0XLjbaSjElhIr+AAAAAXRSTlMAQObYZgAAAHlJREFUCNdNyosOwyAIhWHAQS1Vt7a77/3fcxxdmv0xwmckutAR1nkm4ggbyEcg/wWmlGLDAA3oL50xi6fk5ffZ3E2E3QfZDCcCN2YtbEWZt+Drc6u6rlqv7Uk0LdKqqr5rk2UCRXOk0vmQKGfc94nOJyQjouF9H/wCc9gECEYfONoAAAAASUVORK5CYII=)](https://scala-steward.org)\n\nManipulate [Protocol Buffers](https://developers.google.com/protocol-buffers/) schemas and records in a generic manner without compiled classes, similar to [Avro](https://avro.apache.org/)'s `GenericRecord`.\n\n# Usage\n\n```scala\nimport me.lyh.protobuf.generic._\n\nval schema1 = Schema.of[MyRecord]  // generic representation of the protobuf schema\nval jsonString = schema1.toJson  // serialize to JSON\nval schema2 = Schema.fromJson(jsonString)  // deserialize from JSON\n\n// read protobuf binary without original class\nval bytes1: Array[Byte] = // binary MyRecord\nval reader = GenericReader.of(schema2)\nval record1 = reader.read(bytes1)  // generic record, i.e. Map[String, Any]\nval jsonRecord = record1.toJson  // JSON string\n\n// write protobuf binary without orignal class\nval record2 = GenericRecord.fromJson(jsonRecord)  // generic record, i.e. Map[String, Any]\nval writer = GenericWriter.of(schema2)\nval bytes2 = writer.write(record2)  // binary MyRecord\n```\n# License\n\nCopyright 2016 Neville Li.\n\nLicensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnevillelyh%2Fprotobuf-generic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnevillelyh%2Fprotobuf-generic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnevillelyh%2Fprotobuf-generic/lists"}