Skip to content

Instantly share code, notes, and snippets.

@farmdawgnation
Last active November 29, 2016 19:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save farmdawgnation/1b958f987a911c40fa3cf7b6997a4c99 to your computer and use it in GitHub Desktop.
Save farmdawgnation/1b958f987a911c40fa3cf7b6997a4c99 to your computer and use it in GitHub Desktop.
Some models for testing JSON serialization/deserialization
package me.frmr.json
import java.util.Date
case class Person(name: String, occupation: String, moneyInTheBank: Double)
sealed trait Resource
sealed trait Employee extends Resource
case class FullTimeEmployee(name: String, title: String, startDate: String, salary: Long) extends Employee
case class PartTimeEmployee(name: String, title: String, startDate: String, wage: Double) extends Employee
sealed trait Contractor extends Resource
case class FullTimeContractor(name: String, title: String, company: String, startDate: String, rate: Double) extends Contractor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment