[wp-trac] [WordPress Trac] #55429: Coding Standard: Use spaces for JSON instead of tabs
WordPress Trac
noreply at wordpress.org
Mon Mar 21 09:15:09 UTC 2022
#55429: Coding Standard: Use spaces for JSON instead of tabs
-----------------------------+-----------------------------
Reporter: scruffian | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Keywords:
Focuses: |
-----------------------------+-----------------------------
When PHP outputs JSON using `json_encode`, there's no option to output it
with tabs instead of spaces. This is particularly relevant in since
https://github.com/WordPress/gutenberg/pull/39048 merged - we now convert
theme.json files that were using tabs to spaces.
We could use a regex to convert these spaces back to tabs, but maybe its
simpler to default to spaces for JSON files since that is the format that
PHP uses.
Opening this ticket to start the discussion...
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55429>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list