Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var resultCustomJsonData = [
- {
- text: "Parent 1",
- nodes: [
- {
- text: "Child 1",
- nodes: [
- {
- text: "Grandchild 1"
- },
- {
- text: "Grandchild 2"
- }
- ]
- },
- {
- text: "Child 2"
- }
- ]
- },
- {
- text: "Parent 2"
- },
- {
- text: "Parent 3"
- },
- {
- text: "Parent 4"
- },
- {
- text: "Parent 5"
- }
- ];
- val customJsonData = Json.toJson(
- tables.map { t => {
- Map(
- "text" -> t.table.name.name, "icon" -> "fa fa-cube", "nodes" -> List (
- Map( "text" -> "properties" )
- )
- )
- }}
- )
- No Json serializer found for type Seq[scala.collection.immutable.Map[String,java.io.Serializable]]. Try to implement an implicit Writes or Format for this type.
- implicit val userWrites = new Writes[User] {
- def writes(user: User) = Json.obj(
- "id" -> user.id,
- "email" -> user.email,
- "firstName" -> user.firstName,
- "lastName" -> user.lastName
- )
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement