number

Synth's number type mirror the supported number types in JSON. All number nodes must have subtype field whose value is one of u64, i64 and f64.

range#

Defines a range over a semi-open interval [low, high) with a specified step. Values are generated by sampling a random non-negative integer n and computing low + n*step.

Example#

{
"type": "number",
"subtype": "f64",
"range": {
"high": 15000000.0, // temperature at sun's core in Celcius
"low": -273.15, // 0 Kelvin
"step": 0.01
}
}

constant#

A constant number type. This will always evaluate to the same number.

Example#

{
"type": "number",
"subtype": "f64",
"constant": 3.14159 // pi
}

id#

A monotonically increasing number type, most commonly used as a unique row identifier. The optional start field defaults to 0 if unspecified.

Synth currently supports u64 ids.

Example#

{
"type": "array",
"length": {
"type": "number",
"subtype": "u64",
"constant": 5
},
"content": {
"type": "number",
"subtype": "u64",
"id": {
"start_at": 10
}
}
}