Skip to content
Json/Protobuf convertors for ScalaPB use argonaut
Scala
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
core
macros/src/main/scala/scalapb_argonaut
project
tests/shared/src/test/scala/scalapb_argonaut
.gitignore
.scalafmt.conf
.travis.yml
LICENSE.txt
README.md
build.sbt
version.sbt

README.md

scalapb-argonaut 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-argonaut" % "0.5.1"

for scala-js, scala-native

libraryDependencies += "io.github.scalapb-json" %%% "scalapb-argonaut" % "0.5.1"

macros

libraryDependencies += "io.github.scalapb-json" %%% "scalapb-argonaut-macros" % "0.5.1"

for ScalaPB 0.7.x

see https://github.com/scalapb-json/scalapb-argonaut/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

You can’t perform that action at this time.