[wp-trac] [WordPress Trac] #61170: Interactivity API: Improve JSON store serialization
WordPress Trac
noreply at wordpress.org
Wed May 15 19:14:43 UTC 2024
#61170: Interactivity API: Improve JSON store serialization
-------------------------------+--------------------------------------
Reporter: jonsurrell | Owner: jonsurrell
Type: enhancement | Status: closed
Priority: normal | Milestone: 6.6
Component: Interactivity API | Version: 6.5
Severity: normal | Resolution: fixed
Keywords: has-patch | Focuses: javascript, performance
-------------------------------+--------------------------------------
Comment (by TobiasBg):
@dmsnell:
Could/Should that bitwise-OR operation be written as
{{{#!php
$json_encode_flags = JSON_HEX_TAG | JSON_UNESCAPED_SLASHES;
if ( is_utf8_charset() ) {
$json_encode_flags |= JSON_UNESCAPED_UNICODE |
JSON_UNESCAPED_LINE_TERMINATORS;
}
}}}
to reduce duplication and for clarity (and for micro-optimization)?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61170#comment:28>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list