Last active
November 29, 2016 19:09
-
-
Save farmdawgnation/1b958f987a911c40fa3cf7b6997a4c99 to your computer and use it in GitHub Desktop.
Some models for testing JSON serialization/deserialization
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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