Data Types
Since Bref supports JSON by default, its data types are exactly the same as JSON.
You can use the following 6 fundamental JSON data types in your Bref files.
1. String
Represents text values. Written inside double quotes ("...").
Supports escape characters (\\", \\n, \\t, etc.).
{ "title": "Bohemian Rhapsody" }2. Number
Represents integers or floating-point numbers.
The decimal separator is a dot (.).
Special values like NaN or Infinity are not supported.
{ "streams": 1980000000, "duration": 5.55 }3. Boolean
Represents logical values: true or false.
{ "is_favorite": true }4. Null
Represents a missing or unknown value.
It is not a string ("null" is different).
{ "album": null }5. Object
Represents a collection of key–value pairs.
Defined with curly braces {}.
{
"title": "Bohemian Rhapsody",
"duration": "5:55"
}In Bref, when you use type definitions for objects, you don’t need to include the keys explicitly — only the values in the defined order.
:song { title, duration }
{
"Bohemian Rhapsody", "5:55"
}: song6. Array
Represents an ordered list of values.
Defined with square brackets [].
The values can be of different data types.
[ "Rock", "Pop", "Jazz" ]