.. _SpaceBeforeJsonColon:
**SpaceBeforeJsonColon** (``Boolean``) :versionbadge:`clang-format 17` :ref:`¶ <SpaceBeforeJsonColon>`
- If ``true``, a space will be add before a JSON colon.
+ If ``true``, a space will be added before a JSON colon. For other
+ languages, e.g. JavaScript, use ``SpacesInContainerLiterals`` instead.
.. code-block:: c++
.. _SpacesInContainerLiterals:
**SpacesInContainerLiterals** (``Boolean``) :versionbadge:`clang-format 3.7` :ref:`¶ <SpacesInContainerLiterals>`
- If ``true``, spaces are inserted inside container literals (e.g.
- ObjC and Javascript array and dict literals).
+ If ``true``, spaces are inserted inside container literals (e.g. ObjC and
+ Javascript array and dict literals). For JSON, use
+ ``SpaceBeforeJsonColon`` instead.
.. code-block:: js
/// \version 7
bool SpaceBeforeInheritanceColon;
- /// If ``true``, a space will be add before a JSON colon.
+ /// If ``true``, a space will be added before a JSON colon. For other
+ /// languages, e.g. JavaScript, use ``SpacesInContainerLiterals`` instead.
/// \code
/// true: false:
/// { {
/// \version 10
bool SpacesInConditionalStatement;
- /// If ``true``, spaces are inserted inside container literals (e.g.
- /// ObjC and Javascript array and dict literals).
+ /// If ``true``, spaces are inserted inside container literals (e.g. ObjC and
+ /// Javascript array and dict literals). For JSON, use
+ /// ``SpaceBeforeJsonColon`` instead.
/// \code{.js}
/// true: false:
/// var arr = [ 1, 2, 3 ]; vs. var arr = [1, 2, 3];