Skip to content

Instantly share code, notes, and snippets.

@JaniKibichi
Created June 18, 2021 18:01
Show Gist options
  • Save JaniKibichi/8f617edf9bd1dece4d3bb521fd53c081 to your computer and use it in GitHub Desktop.
Save JaniKibichi/8f617edf9bd1dece4d3bb521fd53c081 to your computer and use it in GitHub Desktop.
package com.janikibichi.routes.marshalling
import akka.http.scaladsl.marshallers.sprayjson._
import spray.json._
object WebJSONSupport extends DefaultJsonProtocol with SprayJsonSupport {
implicit val MenuOptionFormat: RootJsonFormat[MenuOption] = jsonFormat8(MenuOption.apply)
implicit val MenuContentFormat: RootJsonFormat[MenuContent] = jsonFormat4(MenuContent.apply)
// MARSHALL LANGUAGE MENU DATA
implicit val LanguageMenuFormat: RootJsonFormat[LanguageMenu] = jsonFormat3(LanguageMenu.apply)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment