GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
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
at the moment there is no good Java DSL for using the Marshaller.oneOf(...) for Content Negotiation. In Java I have to use something like
completeOK(entity, Marshaller.oneOf(JavaConverters.asScalaBuffer(Arrays.asList(JacksonJsonSupport.marshaller(), JacksonXmlSupport.marshaller())).toSeq()))
which is not very nice to use. I'd prefer to have it like this:
completeOK(entity, Marshaller.oneOf(JacksonJsonSupport.marshaller(), JacksonXmlSupport.marshaller()))
I just found out, that the Unmarshaller.firstOf(...) has at least a two parameter version which is missing for Marshaller.oneOf(...).
added two parameters version of Marshaller.oneOf(...) to Java DSL (ak…
added Marshaller.oneOf(m1, m2) to JavaDSL (akka#1551)
I just submitted PR #1552 to address the issue with two Marshallers.
EDIT: I messed up the commit message at first and had to force push to correct it... sorry for the noise.
Fixed indentation of comments akka#1551
added Marshaller.oneOf(m1, m2) to JavaDSL (#1551) (#1552)
* added Marshaller.oneOf(m1, m2) to JavaDSL (#1551)
* Fixed indentation of comments #1551