All Projects → scalapb-json → scalapb-playjson

scalapb-json / scalapb-playjson

Licence: MIT License
Json/Protobuf convertors for ScalaPB use play-json

Programming Languages

scala
5932 projects

Projects that are alternatives of or similar to scalapb-playjson

akka-http-scalapb
akka-http protobuf binary and json marshalling/unmarshalling for ScalaPB messages
Stars: ✭ 15 (+0%)
Mutual labels:  protobuf, scalapb
scalapb-circe
Json/Protobuf convertors for ScalaPB use circe
Stars: ✭ 38 (+153.33%)
Mutual labels:  protobuf, scalapb
play-grpc
Play + Akka gRPC
Stars: ✭ 31 (+106.67%)
Mutual labels:  protobuf, playframework
mnemosyne
Session management service with RPC API based on protobuf.
Stars: ✭ 15 (+0%)
Mutual labels:  protobuf
protopatch
protoc-gen-go patch utility
Stars: ✭ 58 (+286.67%)
Mutual labels:  protobuf
nimpb
Protocol Buffers for Nim
Stars: ✭ 29 (+93.33%)
Mutual labels:  protobuf
pb3-gen-sol
Generate solidity decoders from proto3 files
Stars: ✭ 15 (+0%)
Mutual labels:  protobuf
liftbridge-api
Protobuf definitions for the Liftbridge gRPC API. https://github.com/liftbridge-io/liftbridge
Stars: ✭ 15 (+0%)
Mutual labels:  protobuf
play-scala-anorm-example
Example Play Database Application using Anorm
Stars: ✭ 41 (+173.33%)
Mutual labels:  playframework
zmq-protobuf
communication between python and cpp using zeromq and protobuf
Stars: ✭ 25 (+66.67%)
Mutual labels:  protobuf
nameko-grpc
GRPC Extensions for Nameko
Stars: ✭ 51 (+240%)
Mutual labels:  protobuf
CppSerialization
Performance comparison of the most popular C++ serialization protocols such as Cap'n'Proto, FastBinaryEncoding, Flatbuffers, Protobuf, JSON
Stars: ✭ 89 (+493.33%)
Mutual labels:  protobuf
fieldmask-utils
Protobuf Field Mask Go utils
Stars: ✭ 127 (+746.67%)
Mutual labels:  protobuf
play-java-ebean-example
Example Play application showing Java with Ebean
Stars: ✭ 54 (+260%)
Mutual labels:  playframework
play2-oauth2-provider
This library is enabled using scala-oauth2-provider in Play Framework
Stars: ✭ 28 (+86.67%)
Mutual labels:  playframework
block-explorer
The official Stakenet block explorer
Stars: ✭ 29 (+93.33%)
Mutual labels:  playframework
CoffeeChat
opensource im with server(go) and client(flutter+swift)
Stars: ✭ 111 (+640%)
Mutual labels:  protobuf
protobuf-compiler
online protobuf compiler
Stars: ✭ 24 (+60%)
Mutual labels:  protobuf
vtprotobuf
A Protocol Buffers compiler that generates optimized marshaling & unmarshaling Go code for ProtoBuf APIv2
Stars: ✭ 418 (+2686.67%)
Mutual labels:  protobuf
tsrpc
A TypeScript RPC framework, with runtime type checking and serialization, support both HTTP and WebSocket. It is very suitable for website / APP / games, and absolutely comfortable to full-stack TypeScript developers.
Stars: ✭ 866 (+5673.33%)
Mutual labels:  protobuf

scalapb-playjson

scaladoc

The structure of this project is hugely inspired by scalapb-json4s

Dependency

Include in your build.sbt file

core

libraryDependencies += "io.github.scalapb-json" %% "scalapb-playjson" % "0.15.1"

for scala-js

libraryDependencies += "io.github.scalapb-json" %%% "scalapb-playjson" % "0.15.1"

macros

libraryDependencies += "io.github.scalapb-json" %% "scalapb-playjson-macros" % "0.15.1"

Usage

There are four functions you can use directly to serialize/deserialize your messages:

JsonFormat.toJsonString(msg) // returns String
JsonFormat.toJson(msg) // returns JsObject

JsonFormat.fromJsonString(str) // return MessageType
JsonFormat.fromJson(json) // return MessageType

Or you can use Reads/Writes/Format implicitly:

implicit val myMsgWrites: Writes[MyMsg] = JsonFormat.protoToWriter[MyMsg]

implicit val myMsgReads: Reads[MyMsg] = JsonFormat.protoToReads[MyMsg]

implicit val myMsgFormat: Format[MyMsg] = JsonFormat.protoToFormat[MyMsg]

Credits

fork from https://github.com/whisklabs/scalapb-playjson

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].