All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.rojoma.json.v3.-impl.ast.DownCaster.scala Maven / Gradle / Ivy

The newest version!
package com.rojoma.json.v3
package `-impl`.ast

import ast._

class DownCaster[T <: JValue](val `private once 2.10 is no more` : T) extends AnyVal {
  def cast[U <: T](implicit j: Json[U]): Option[U] = {
    if(j.jsonTypes(`private once 2.10 is no more`.jsonType)) Some(`private once 2.10 is no more`.asInstanceOf[U])
    else None
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy