Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scalapb-json4s for Scala 2.13 #674

Closed
lostiniceland opened this issue Oct 3, 2019 · 3 comments
Closed

scalapb-json4s for Scala 2.13 #674

lostiniceland opened this issue Oct 3, 2019 · 3 comments

Comments

@lostiniceland
Copy link

Any plans on releasing the json-support for Scala 2.13?

If the project is not continued, how can I convert from a generated case-class to the underlying java-type, so I could use the protobuf-java-format artefakt which expects a GeneratedMessage type to print to json.

@lostiniceland
Copy link
Author

With regards to the Java-compatibility: the docs mention how to achieve this with SBT

PB.targets in Compile := Seq(
  PB.gens.java -> (sourceManaged in Compile).value,
  scalapb.gen(javaConversions=true) -> (sourceManaged in Compile).value
)

How to configure this via Maven ( I've followed the sample from here https://github.com/thesamet/scalapb-maven-example/blob/master/pom.xml )

@thesamet
Copy link
Contributor

thesamet commented Oct 3, 2019

Hi @lostiniceland , we already have 2.13 support in the past few versions: https://mvnrepository.com/artifact/com.thesamet.scalapb/scalapb-json4s

For java conversions on maven. The scala/java converters are generating optionally by passing a parameter to the plugin. Currently, protobuf-maven-plugin does not support passing parameters to plugins (see xolstice/protobuf-maven-plugin#61). Once this is supported, you can add java_conversions as a generator parameter.

@lostiniceland
Copy link
Author

Thanks for the clarrification. My Maven search was somehow wrong, the latest version I saw was 0.3.3 which only had Scala 2.12. Sorry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants