Skip to content

Instantly share code, notes, and snippets.

@zeryx
Created February 25, 2016 16:58
Show Gist options
  • Save zeryx/286ce529e6a0b7e77d27 to your computer and use it in GitHub Desktop.
Save zeryx/286ce529e6a0b7e77d27 to your computer and use it in GitHub Desktop.
case class SplitOnce(inputVideoUrl: String,
outputFolder: String,
outputPrefix: String,
outputExtension: String,
startTime: String,
stopTime: String) extends Inputs
//this had a runtime exeception, SplitOnce.getClass returned the SplitOnce Companion Obj
val inputObj: SplitOnce = gson.fromJson[SplitOnce](data.toString, SplitOnce.getClass)
applyMethod(inputObj)
// this passed and parsed perfectly, as the classOf[] operator finds the class component of the case class.
val inputObj: SplitOnce = gson.fromJson[SplitOnce](data.toString, classOf[SplitOnce])
applyMethod(inputObj)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment