From 718b0b2f336a88da234e6c57b4d2ff2cb383c114 Mon Sep 17 00:00:00 2001 From: Andrey Helldar Date: Sat, 6 Sep 2025 01:01:16 +0300 Subject: [PATCH] Updated `JsonLinesConverter` to use `jsonl.options` configuration --- config/feeds.php | 9 +++++++++ src/Converters/JsonLinesConverter.php | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/config/feeds.php b/config/feeds.php index cc47380..61018ac 100644 --- a/config/feeds.php +++ b/config/feeds.php @@ -125,5 +125,14 @@ */ 'options' => JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE, ], + + 'jsonl' => [ + /** + * JSON encoding flags used when exporting feeds to JSON. + * + * The JSON_PRETTY_PRINT option is not available for JSON Lines files and will be ignored. + */ + 'options' => JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE, + ], ], ]; diff --git a/src/Converters/JsonLinesConverter.php b/src/Converters/JsonLinesConverter.php index e0db8a4..bafbec8 100644 --- a/src/Converters/JsonLinesConverter.php +++ b/src/Converters/JsonLinesConverter.php @@ -15,7 +15,7 @@ class JsonLinesConverter extends Converter { public function __construct( - #[Config('feeds.converters.json.options')] + #[Config('feeds.converters.jsonl.options')] protected int $options, #[Config('feeds.pretty')] bool $pretty,