-
Notifications
You must be signed in to change notification settings - Fork 190
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
ProductFormats.jsonFormatN does not work with parameterized classes #34
Comments
Kim, |
I created a minimal example at https://github.com/KimStebel/spray-json-example Scala version is 2.9.2 and spray-json version is 1.2.2. scala.MatchError: [Ljava.lang.String;@55ab9655 (of class [Ljava.lang.String;) |
The declaration Do you really need the We have to improve the error message, though. |
I don't need the JsonFormat inside the case class, but I would still like to constrain the type parameter in that way. I guess I can just put the constraint on the implicit method that creates the JsonFormat for the case class, but that makes the API a little harder to understand. The use case is creating a library for CouchDB, so I need to constrain which types can be used as parameters. A better error message would be nice. |
All jsonFormatN methods throw a MatchError if one tries to call them with a polymorphic class. Example:
The text was updated successfully, but these errors were encountered: