Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
53 lines (37 sloc) 776 Bytes
rfc start_date decision_date pr status
0019
2018-08-23
2018-08-29
openregister/registers-rfcs#32
approved

Boolean datatype

Summary

This RFC proposes a new datatype to represent boolean values.

Motivation

The datatypes in registers cover most of the common values you find in other systems. Although some systems opt to represent booleans as 0 and 1, it is ambiguous without human interaction.

Explanation

The boolean datatype can have two states: true or false.

type Boolean
  = True
  | False

The ABNF definition for the string representation is:

boolean = "true" / "false"

EXAMPLE:

For example, in JSON:

{"foo": "true", "bar": "false"}

And in CSV:

foo, bar
true, false