grouzen / play2-jsend Goto Github PK
View Code? Open in Web Editor NEWplay2 module with helpers for JSend specification
play2 module with helpers for JSend specification
Jsend.error works properly when called with objs
containing some value:
JSend.error("My error message.", None, Some(Seq("foo" -> "bar")))
Though, when I pass objs
as None
, such as in:
JSend.error("My error message.", None, None)
or
JSend.error("My error message.")
I get the following compile error:
diverging implicit expansion for type play.api.libs.json.Writes[A] starting with object StringWrites in trait DefaultWrites
Using JSend.error with an empty objs
is the most common usage. Thus this bug is rather critical.
It happens with Play 2.5 and Scala 2.11, I did not test with earlier versions.
It would be much handy if you could publish this library into some code repo such as Maven Central.
Right now the only way to use it is to publish it into the local repo. This adds complexity to build scripts and CI environments.
Currently all test are failing with an error similar to this:
play2-jsend/test/src/main/scala/play/api/libs/json/JSendSpec.scala:17: type mismatch;
found : play.api.libs.json.JsString
required: play.api.libs.json.JsLookupResult
(json \ "status") must be equalTo(JsString("success"))
I don't know what type we really want, and thus what should be the proper solution.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.