json - What does N in jsonFormatN in spray mean? -
i'm looking @ code of "akka , spray" tutorial in typesafe's activator, written eigengo. not jsonformat1, jsonformat2, ... jsonformatn defined , how does.
implicit val sendmessageformat = jsonformat2(sendmessage)
the above snippet in scala > api > messengerservice.scala
thank you.
basically, n
in jsonformatn
denotes number of parameters of class trying marshall/unmarshall.
an excerpt link posted ashalynd:
the jsonformatx methods reduce boilerplate minimum, pass right 1 companion object of case class , return ready-to-use jsonformat type (the right 1 one matching number of arguments case class constructor, e.g. if case class has 13 fields need use jsonformat13 method).
Comments
Post a Comment