tjweir/pocketchangeapp — Issue #11: compile error in RestAPI.scala - No implicit view available
Author: zachariahkral
Created: 2011-10-21 05:48:11+00:00
State: open

Lift version 2.4 M4
IDE: netbeans 7.0.1

Errors on line 164 and 170: No implicit view available

serveJx {
case Get(List("api", "expense", Expense(expense,_)), _) => Full(expense)
}

// Just an example of autoconversion
serveJx {
case Get(List("api", "greet", name),_) =>
auto(Map("greeting" ->
Map("who" -> name,
"what" -> ("Hello at " + new java.util.Date))))
}

as per this thread I gave the first block a hint [Expense] and it solved the issue
https://groups.google.com/group/liftweb/browse_thread/thread/29013d61462eae71/344376131a2caab4?lnk=gst&q=I%27m+trying+to+expose+some+data+through+REST+using+lift#344376131a2caab4

serveJx[Expense] {
case Get(List("api", "expense", Expense(expense,_)), _) => Full(expense)
}

the second (example of autoconversion), since I haven't gotten that far in the book, I just deleted. After those two changes, the whole project compiled.