You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When saving flex-objects data with JSON formatter we are allowed to set some options like file_extension, encode_options, decode_assoc, etc. The thing is, encode_options param is not handled. Example:
Encode options are useful when dealing with non-latin symbols, like Cyrillic. By default Cyrillic is escaped to \u123456. So the JSON looks completely gibberish:
Setting encode_options: 'JSON_UNESCAPED_UNICODE' (int 256) should help with that, unless it won't.
All the constants like 'JSON_UNESCAPED_UNICODE' => JSON_UNESCAPED_UNICODE are defined in 'Grav\Framework\File\Formatter\JsonFormatter', but it is never called. Instead grav\vendor\rockettheme\toolbox\File\src\JsonFile.php is used. And the encoding options are never passed to it:
The text was updated successfully, but these errors were encountered:
u07
changed the title
JSON formatter ignores encode_options: "..."
Option encode_options: "..." is ignored
Nov 1, 2023
Hi!
When saving flex-objects data with JSON formatter we are allowed to set some options like file_extension, encode_options, decode_assoc, etc. The thing is, encode_options param is not handled. Example:
Encode options are useful when dealing with non-latin symbols, like Cyrillic. By default Cyrillic is escaped to \u123456. So the JSON looks completely gibberish:
Setting
encode_options: 'JSON_UNESCAPED_UNICODE'
(int 256) should help with that, unless it won't.All the constants like
'JSON_UNESCAPED_UNICODE' => JSON_UNESCAPED_UNICODE
are defined in'Grav\Framework\File\Formatter\JsonFormatter'
, but it is never called. Insteadgrav\vendor\rockettheme\toolbox\File\src\JsonFile.php
is used. And the encoding options are never passed to it:The text was updated successfully, but these errors were encountered: