boolean
LogicGenerate true/false boolean values with configurable probability. Set probability to 0.8 for 80% true values, or leave default for 50/50 distribution.
Example Outputs
truefalseParameters
| Parameter | Description |
|---|---|
| probability | Probability of true (0-1, default 0.5) |
API Usage
Send a POST request to generate boolean data:
curl -X POST https://mockhero.dev/api/v1/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"tables": [
{
"name": "example",
"count": 5,
"fields": [
{
"name": "boolean",
"type": "boolean",
"params": {
"probability": 0.7
}
}
]
}
]
}'Common Use Cases
- Feature flag testing
- Toggle states
- Checkbox fields
- Active/inactive status
Quick Info
- Field Type
- boolean
- Category
- Logic
- Parameters
- 1 parameter
- Output Format
- JSON, CSV, SQL
Generate Boolean + 155 more types via API
One API call. Multiple tables. Relational integrity. Free tier included.