Table of Contents
Reference 🔗
- Option
- Literal Types
- Collections
- Maps
- Simple Enums
- Case Classes
- Sum Types
- Union Types
- Named Tuples
- Dynamic Json
Simple types: Int, Double, Boolean, String etc work out of the box.
import ba.sake.tupson.{given, *}
// write a value to JSON string
val myValue = 123
println(123.toJson) // 123
// parse a value from JSON string
val myParsedValue = """123""".parseJson[Int]
println(myParsedValue) // 123