Created
November 11, 2013 20:22
-
-
Save thesamet/7419702 to your computer and use it in GitHub Desktop.
Filter JS serialization
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package controllers | |
import play.api.libs.json.Json | |
class Test { | |
case class Filter(id: Int, table: String, name: String, Type: String, structure: String) | |
implicit val filterWrites = Json.writes[Filter] | |
def tojs = { | |
val l: List[Filter] = List(Filter(3, "4", "5", "6", "7")) | |
Json.toJson(l) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment