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

getting "invalid json" when using Long parameter type and not String #12

Closed
alexmnyc opened this issue Mar 9, 2015 · 4 comments
Closed

Comments

@alexmnyc
Copy link

alexmnyc commented Mar 9, 2015

.jsonCall("getPonyByName", (id:Long) => {
// Return the matching pony
Full(MyPony.findById(id))
}

@joescii
Copy link
Owner

joescii commented Mar 10, 2015

I'll take a look at this when I get some time. It's possible that this is a general Lift question, so you may want to post this question on the Google Group.

@joescii
Copy link
Owner

joescii commented Mar 14, 2015

Sorry I've been slow getting back to you. As I sit to take a second look at this, probably what should happen is a compilation failure in this case. The value arguments are Unit, String, and NgModel. If you want to pass a Long, I would recommend defining a simple case class to wrap it up =>

case class PonyRequest(id:Long) extends NgModel

.jsonCall("getPonyById", (req:PonyRequest) => {
  Full(MyPony.findById(req.id))
}

joescii added a commit that referenced this issue Jul 26, 2015
@joescii
Copy link
Owner

joescii commented Aug 9, 2015

I've finally found time to dig into this. I have no idea why this compiles, so I have opened a stackoverflow question to get some insight.

@joescii
Copy link
Owner

joescii commented Aug 10, 2015

This will fail to compile in 0.7.0.

@joescii joescii closed this as completed Aug 10, 2015
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