<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/62229>62229</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang-format 16 on JSON with a leading space doesn't indent correctly
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
JohnC32
</td>
</tr>
</table>
<pre>
Given this JSON where there is a space before the "{":
```json
{
"a": "foo",
"b": []
}
```
using `_clang-format`:
```yaml
---
BasedOnStyle: Google
IndentWidth: 4
ColumnLimit: 100
...
```
clang-format 16 yields the following:
```json
{
"a": "foo",
"b": []
}
```
Notice the opening "{" is not in the first column.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzMU09v2z4M_TTyRbAhy__qgw6_JkjxK4b20MOOgyzRtgpZDCy5Qb79ICvBugLbeUDA0I-k-PRISe_N5AAEaR5Jc8zkFmZcxTPO7lDxbEB9FU_mAxwNs_H0-e31hV5mWIGG3RpPJfVnqYAOMGLCKeGcdI_RVv8RdiTsbluWfu8eXYJoTEwepbFQprLojojxgx9-SxjuCTvj28Hd8UuHz203b9xESct-KCvdlI-4LjLEpD_Qu8rFJijP8-Q8Sg_61b2Fq4XY_QlxspBi_zsNLnw3OswxVCf0gHZb3DezmBDRkt04FUXxF66fGdKypVcDVvtd1RGtxYtx07-h6gsGo9K88Qxul_g-97gXDgM1LjE3qw9U7YLcLp9pUem-6mUGomwfyoeuqXmfzQKabihlPWjeds3IxpFLBYrJRnYdNGrIjOCMV6wue1ZVHeuLdmz1wOQIXVO3LW9JzWCRxhbWfiwFrlNmvN9AtJzzPrNyAOv3fefcwYXuwci8OWariDX5sE2e1MwaH_yvU4IJFsTXAaG7vQoTZiqpBamjFOlNaATvCO-iEnFHqMJ1BRXsNdtWK-YQzj5Ok58IP00mzNtQKFwIP8Wut7_8vOI7qED4aefqCT_td_kZAAD__zFHDP0">