DotBeer

Measurement

‘Measurement’ is not a type itself, but a subschema holding various types of measurement, and ranges thereof.

In principle, we could have sub-groupings such as “physical quantities” (volume, mass, acidity, etc), “non-physical quantities” (percentage, count, date, etc). However, this adds complexity to the schema for little gain, because there is nowhere else in the schema where we would rely on such groupings. So, instead, we keep a flat hierarchy.

In several cases, there is only one possible unit (eg acidity, percentage, count), so it would be possible to omit units altogether. However, in common with BeerJSON, we retain them for a couple of reasons. Firstly, it makes the serialisation easier to understand for human readers. Secondly, it makes things more extendable: eg, if we decided at a future date we would like to support “percentage points” in addition to “percentages”, then it’s a smaller change to add them.

For Ranges, note that we do not force the same units for lower and upper bounds. This is partly because it would complicate the schema for only small gain, and partly because it’s conceivable that you want different units on min and max (eg if you had a mass range you might want min in grams and max in kilograms).


Component Types

Acidity

Acidity is a JSON object with the following properties:

Property Required? Type
unit Enum:
 ∙ pH
value number

Bitterness

Bitterness is a JSON object with the following properties:

Property Required? Type
unit Enum:
 ∙ IBUs
value number

Carbonation

Carbonation is a JSON object with the following properties:

Property Required? Type
unit Enum:
 ∙ vols
 ∙ g/l
value number

Color

Supports both grain color properties, such as Lovibond, and wort color properties such as SRM and EBC.

Color is a JSON object with the following properties:

Property Required? Type Description
unit Enum:
 ∙ EBC
 ∙ Lovi
 ∙ SRM
EBC is European Brewing Convention system of color measurement
Lovi is Lovibond
SRM is Standard Reference Method color measurement system
value number  

Count

Used where unitless amounts are required, such as 1 apple, or 1 yeast packet. Note that this is allowed to be fractional because you might want to add 1½ cinnamon sticks or 2.5 packets of yeast.

Count is a JSON object with the following properties:

Property Required? Type
unit Enum:
 ∙ 1
 ∙ unit
 ∙ each
 ∙ dimensionless
 ∙ pkg
value number

Date

To avoid ambiguity, dates are always stored in ISO 8601 format. The two possibilities here are with and without time of day.

Date is a string matching regular expression \d{4}-\d{2}-\d{2}\|\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}

Gravity

In brewing, “gravity” is a shorthand for “specific gravity”. Typically, brewers measure relative gravity (aka specific gravity) to gauge percent of sugar content (ie Plato and Brix).

Gravity is a JSON object with the following properties:

Property Required? Type Description
unit Enum:
 ∙ sg
 ∙ plato
 ∙ brix
sg is specific gravity
plato is degrees Plato (°P)
brix is degrees Brix (°Bx)
value number  

DiastaticPower

Diastatic power is a measurement of malted grains enzymatic content. A value of 35 Lintner is needed to self convert, while a value of 100 or more is desirable for base malts.

DiastaticPower is a JSON object with the following properties:

Property Required? Type
unit Enum:
 ∙ Lintner
 ∙ WK
value number

Length

Length is a JSON object with the following properties:

Property Required? Type
unit Enum:
 ∙ mm
 ∙ cm
 ∙ m
 ∙ in
 ∙ ft
value number

Mass

Mass is a JSON object with the following properties:

Property Required? Type Description
unit Enum:
 ∙ mg
 ∙ g
 ∙ kg
 ∙ lb
 ∙ oz
mg is milligrams
g is grams
kg is kilograms
lb is pounds (imperial and US customary)
oz is ounces (imperial and US customary)
value number  

MassFractionOrConcentration

Strictly speaking, mass concentration (eg mg/l) is different from mass fraction (eg ppm, ppb) but, in the context of brewing, it is usually approximately true that 1 mg/L mass concentration = 1 parts per million (ppm) mass fraction.

MassFractionOrConcentration is a JSON object with the following properties:

Property Required? Type Description
unit Enum:
 ∙ ppm
 ∙ ppb
 ∙ mg/l
ppm is parts per million
ppb is parts per billion
mg/l is milligrams per liter
value number  

Percentage

Percentage is a JSON object with the following properties:

Property Required? Type
unit Enum:
 ∙ %
value number

Pressure

Pressure is a JSON object with the following properties:

Property Required? Type Description
unit Enum:
 ∙ kPa
 ∙ psi
 ∙ bar
kPa is kilopascals
psi is pounds per square inch
bar is bar (where 1 bar = 100 kPa)
value number  

SpecificHeatCapacity

The amount of heat that must be added to one unit of mass of the substance in order to cause an increase of one unit in temperature.

SpecificHeatCapacity is a JSON object with the following properties:

Property Required? Type
unit Enum:
 ∙ Cal/(g C)
 ∙ J/(kg K)
 ∙ BTU/(lb F)
value number

SpecificVolume

Specific volume is the reciprocal of Gravity, commonly used for mash thickness.

SpecificVolume is a JSON object with the following properties:

Property Required? Type
unit Enum:
 ∙ qt/lb
 ∙ gal/lb
 ∙ gal/oz
 ∙ l/g
 ∙ l/kg
 ∙ floz/oz
 ∙ m^3/kg
 ∙ ft^3/lb
value number

Temperature

Temperature is a JSON object with the following properties:

Property Required? Type Description
unit Enum:
 ∙ C
 ∙ F
C is degrees Celsius (°C)
F is decrees Fahrenheit (°F)
value number  

Time

Note this is NOT dates or times of day but length-of-time or elapsed time, eg duration of a mash step, or how long after the start of the boil to add something.

Time is a JSON object with the following properties:

Property Required? Type Description
unit Enum:
 ∙ sec
 ∙ min
 ∙ hr
 ∙ day
 ∙ week
sec is seconds
min is minutes
hr is hours
day is days
week is weeks
value integer  

VersionNumber

We use semantic versioning, which encodes a version by a three-part version number (Major.Minor.Patch)

VersionNumber is a string matching regular expression \d+[.]\d+[.]\d+

Viscosity

Viscosity of fluids

Viscosity is a JSON object with the following properties:

Property Required? Type
unit Enum:
 ∙ cP
 ∙ mPa-s
value number

Volume

Volume is a JSON object with the following properties:

Property Required? Type Description
unit Enum:
 ∙ ml
 ∙ l
 ∙ tsp
 ∙ tbsp
 ∙ floz
 ∙ cup
 ∙ pt
 ∙ qt
 ∙ gal
 ∙ bbl
 ∙ itsp
 ∙ itbsp
 ∙ ifloz
 ∙ icup
 ∙ ipt
 ∙ iqt
 ∙ igal
 ∙ ibbl
ml is milliliters (Metric/SI)
l is liters (Metric/SI)
tsp is US teaspoons
tbsp is US tablespoons
floz is US fluid ounces
cup is US cups
pt is US pints (liquid)
qt is US quarts (liquid)
gal is US gallons (liquid)
bbl is US barrels (liquid)
itsp is Imperial teaspoons
itbsp is Imperial tablespoons
ifloz is Imperial fluid ounces
icup is Imperial cups
ipt is Imperial pints (liquid)
iqt is Imperial quarts (liquid)
igal is Imperial gallons (liquid)
ibbl is Imperial barrels (liquid)
value number  

RangeOfBitterness

RangeOfBitterness is a JSON object with the following properties:

Property Required? Type
minimum Bitterness
maximum Bitterness

RangeOfCarbonation

RangeOfCarbonation is a JSON object with the following properties:

Property Required? Type
minimum Carbonation
maximum Carbonation

RangeOfTemperature

RangeOfTemperature is a JSON object with the following properties:

Property Required? Type
minimum Temperature
maximum Temperature

RangeOfColor

RangeOfColor is a JSON object with the following properties:

Property Required? Type
minimum Color
maximum Color

RangeOfGravity

RangeOfGravity is a JSON object with the following properties:

Property Required? Type
minimum Gravity
maximum Gravity

RangeOfPercentage

RangeOfPercentage is a JSON object with the following properties:

Property Required? Type
minimum Percentage
maximum Percentage

Documentation generated from the DotBeer schema (v0.3.0) on 2026-07-27 at 18:10:02+0200.