JSON.CreateBoolean
------------------

Creates a boolean node with given value.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [JSON](component_JSON.md) | [6.0](newinversion60.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "JSON.CreateBoolean"; Value ) 

**MBS**( **"JSON.CreateBoolean";** /\* Creates a boolean node with given value. \*/  
**$Value**) /\* The boolean value. Pass 1 for true and 0 for false.e.g. 1 \*/ 

(old name: JSON.CreateBool)

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Value | The boolean value. Pass 1 for true and 0 for false. | 1 |

### Result

Returns JSON or error.

### Description

Creates a boolean node with given value.  
As we pass JSON in JSON around, you can simply write "false" directly instead of calling one of this functions.  
### Examples

Create a boolean with an expression:

 Set Variable \[$json ; Value:MBS ( "JSON.CreateBoolean"; Length($text ) &gt; 0 )\]  
<small>  
Example result: true</small>### See also

- [JSON.AddBooleanToObject](JSONAddBooleanToObject.md)

### Blog Entries

- [With JSON in excellent form](https://www.mbsplugins.de/archive/2019-11-16/With_JSON_in_excellent_form/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 6.0pr6](https://www.mbsplugins.de/archive/2016-01-13/MBS_FileMaker_Plugin_version_6/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 5/2020, Seite 17](https://filemaker-magazin.de/neuigkeit/4110-Appetithappen-FMM_202005)

This function is free to use.

Created 5th January 2016 , last changed 29th September 2025

  
[JSON.CreateArrayRef](JSONCreateArrayRef.md) - [JSON.CreateDoubleArray](JSONCreateDoubleArray.md)

[HTML Version](JSONCreateBoolean.shtml)