Skip to content

showmant/scalapb-circe

This branch is 598 commits behind scalapb-json/scalapb-circe:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

7595355 · Jan 18, 2019
Dec 29, 2018
Dec 29, 2018
Jan 18, 2019
Dec 29, 2018
Sep 29, 2016
Dec 28, 2018
Dec 9, 2018
Jan 3, 2018
Jan 10, 2019
Jan 18, 2019
Jan 10, 2019

Repository files navigation

scalapb-circe Build Status

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-circe" % "0.4.2"

for scala-js

libraryDependencies += "io.github.scalapb-json" %%% "scalapb-circe" % "0.4.2"

macros

libraryDependencies += "io.github.scalapb-json" %% "scalapb-circe-macros" % "0.4.2"

for ScalaPB 0.7.x

see https://github.com/scalapb-json/scalapb-circe/tree/0.2.x

Usage

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

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

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

Credits

About

Json/Protobuf convertors for ScalaPB use circe

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Scala 100.0%