Skip to content

Commit 8e66489

Browse files
Merge pull request #106 from TheDragonCode/1.x
Updated `JsonLinesConverter` to use `jsonl.options` configuration
2 parents 04e3487 + 718b0b2 commit 8e66489

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

config/feeds.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,5 +125,14 @@
125125
*/
126126
'options' => JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE,
127127
],
128+
129+
'jsonl' => [
130+
/**
131+
* JSON encoding flags used when exporting feeds to JSON.
132+
*
133+
* The JSON_PRETTY_PRINT option is not available for JSON Lines files and will be ignored.
134+
*/
135+
'options' => JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE,
136+
],
128137
],
129138
];

src/Converters/JsonLinesConverter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
class JsonLinesConverter extends Converter
1616
{
1717
public function __construct(
18-
#[Config('feeds.converters.json.options')]
18+
#[Config('feeds.converters.jsonl.options')]
1919
protected int $options,
2020
#[Config('feeds.pretty')]
2121
bool $pretty,

0 commit comments

Comments
 (0)