21 lines
No EOL
503 B
Kotlin
21 lines
No EOL
503 B
Kotlin
fun main(args: Array<String>) {
|
|
println(
|
|
Transaction(
|
|
Money(3020),
|
|
category = "Transportation",
|
|
location = "Arian's",
|
|
timestamp = "Jan 01, 2018 00:00"
|
|
)
|
|
)
|
|
|
|
val t = Transaction.fromJSON(
|
|
"{\"cost\": 2168," +
|
|
" \"category\": \"Transportation\"," +
|
|
" \"location\": \"Arian's\"," +
|
|
" \"timestamp\": \"Jan 01, 2018 00:00\"}"
|
|
)
|
|
|
|
println(t)
|
|
|
|
println(t.serialize())
|
|
} |