Skip to main content
Version: 2.x

Standard Type Reference

ZIO Schema provides a number of built-in primitive types, that we can use to represent our data. Each one has a defaultValue that generates a value of the type. The following table lists every standard type and whether defaultValue succeeds on each platform. A โŒ means that defaultValue returns a Left on that platform, because the value cannot be generated there:

Standard TypeJVMScalaJSScala Native
Booleanโœ…โœ…โœ…
Byteโœ…โœ…โœ…
Charโœ…โœ…โœ…
Chunk[Byte]โœ…โœ…โœ…
Doubleโœ…โœ…โœ…
Floatโœ…โœ…โœ…
Intโœ…โœ…โœ…
Longโœ…โœ…โœ…
Shortโœ…โœ…โœ…
Stringโœ…โœ…โœ…
Unitโœ…โœ…โœ…
java.math.BigDecimalโœ…โœ…โœ…
java.math.BigIntegerโœ…โœ…โœ…
java.time.DayOfWeekโœ…โœ…โœ…
java.time.Durationโœ…โœ…โœ…
java.time.Instantโœ…โœ…โœ…
java.time.LocalDateโœ…โœ…โœ…
java.time.LocalDateTimeโœ…โœ…โœ…
java.time.LocalTimeโœ…โœ…โœ…
java.time.Monthโœ…โœ…โœ…
java.time.MonthDayโœ…โœ…โœ…
java.time.OffsetDateTimeโœ…โœ…โœ…
java.time.OffsetTimeโœ…โœ…โœ…
java.time.Periodโœ…โœ…โœ…
java.time.Yearโœ…โœ…โœ…
java.time.YearMonthโœ…โœ…โœ…
java.time.ZoneIdโœ…โœ…โœ…
java.time.ZoneOffsetโœ…โœ…โœ…
java.time.ZonedDateTimeโœ…โœ…โœ…
java.util.Currencyโœ…โŒโŒ
java.util.UUIDโœ…โŒโœ…

ZIO Chat

Hi, fellow coder! ๐ŸŒŸ Welcome to your ZIO adventure with the ZIO Chat Bot. ๐Ÿš€ Let's master functional Scala together. From referential transparency to concurrent prowess, I've got your back. Ready to dive in? Your questions, my insights โ€“ let's conquer ZIO! ๐Ÿ’ก๐Ÿค–