Skip to content

Commit 1f53f38

Browse files
Merge pull request #100 from TheDragonCode/1.x
Added JSON feed support
2 parents 5ded5da + 8a0fd48 commit 1f53f38

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+853
-163
lines changed

config/feeds.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,4 +113,17 @@
113113
Transformers\EnumTransformer::class,
114114
// Transformers\NullTransformer::class,
115115
],
116+
117+
/**
118+
* Converters define low-level serialization settings for specific output
119+
* formats. You can tweak encoder flags and other options here.
120+
*/
121+
'converters' => [
122+
'json' => [
123+
/**
124+
* JSON encoding flags used when exporting feeds to JSON.
125+
*/
126+
'options' => JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE,
127+
],
128+
],
116129
];

docs/labels.list

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE labels SYSTEM "https://resources.jetbrains.com/writerside/1.0/labels-list.dtd">
3+
<labels xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:noNamespaceSchemaLocation="https://resources.jetbrains.com/writerside/1.0/labels.xsd"
5+
>
6+
<secondary-label id="format-xml" name="xml" color="purple">
7+
Available for XML feeds
8+
</secondary-label>
9+
10+
<secondary-label id="format-json" name="json" color="strawberry">
11+
Available for JSON feeds
12+
</secondary-label>
13+
14+
</labels>

docs/laravel-feeds.tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<toc-element toc-title="License" topic="license.topic" />
1313
</toc-element>
1414
<toc-element topic="introduction.topic">
15+
<toc-element topic="supported-formats.topic" />
1516
<toc-element topic="installation.topic" />
1617
<toc-element topic="create-feeds.topic" />
1718
<toc-element topic="generation.topic">

docs/snippets/advanced-directive-array.xml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22
<array_directive>
33

44
<user>
5-
<name>Miss Candace Fadel DVM</name>
6-
<avatar>https://via.placeholder.com/640x480.png/002200?text=occaecati</avatar>
7-
<avatar>https://via.placeholder.com/640x480.png/00ee99?text=odio</avatar>
8-
<images name="cumque fugit maiores">https://via.placeholder.com/640x480.png/006611?text=numquam</images>
9-
<images name="reiciendis aperiam molestias">https://via.placeholder.com/640x480.png/004400?text=quibusdam</images>
5+
<name>Giles Graham</name>
6+
<avatar>https://via.placeholder.com/640x480.png/0066dd?text=ullam</avatar>
7+
<avatar>https://via.placeholder.com/640x480.png/0033ff?text=autem</avatar>
8+
<images name="sit consequatur ipsa">https://via.placeholder.com/640x480.png/00ddaa?text=voluptatibus</images>
9+
<images name="deserunt aspernatur veniam">https://via.placeholder.com/640x480.png/00cc55?text=in</images>
1010
</user>
1111
<user>
12-
<name>Mavis Botsford Sr.</name>
13-
<avatar>https://via.placeholder.com/640x480.png/0000ee?text=aut</avatar>
14-
<avatar>https://via.placeholder.com/640x480.png/0077dd?text=ut</avatar>
15-
<images name="fuga qui sit">https://via.placeholder.com/640x480.png/001155?text=quidem</images>
16-
<images name="voluptatem qui dolorum">https://via.placeholder.com/640x480.png/00aaff?text=eum</images>
12+
<name>Katelyn Harber</name>
13+
<avatar>https://via.placeholder.com/640x480.png/0066dd?text=voluptatem</avatar>
14+
<avatar>https://via.placeholder.com/640x480.png/004488?text=quaerat</avatar>
15+
<images name="consequuntur voluptatem voluptatem">https://via.placeholder.com/640x480.png/006655?text=ipsam</images>
16+
<images name="fugiat consectetur qui">https://via.placeholder.com/640x480.png/007788?text=nam</images>
1717
</user>
1818

1919
</array_directive>
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<attributes_directive>
33

4-
<company since="1987"/>
4+
<company since="2007"/>
55
<url>https://example.com</url>
66

77
<user>
8-
<name>Jules Herman</name>
9-
<contact email="nwiza@example.net" phone="555-000-1"/>
8+
<name>Melvina Beer</name>
9+
<contact email="lchamplin@example.org" phone="555-000-1"/>
1010
</user>
1111
<user>
12-
<name>Donavon Borer</name>
13-
<contact email="cronin.anabel@example.net" phone="555-000-2"/>
12+
<name>Vivienne Willms</name>
13+
<contact email="raynor.bertram@example.com" phone="555-000-2"/>
1414
</user>
1515

1616
</attributes_directive>

docs/snippets/advanced-directive-cdata.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
<cdata_directive>
33

44
<user>
5-
<name><![CDATA[<h1>Deborah Koelpin</h1>]]></name>
6-
<email>dorris.keeling@example.com</email>
5+
<name><![CDATA[<h1>Elmo Hilpert</h1>]]></name>
6+
<email>alex.mohr@example.net</email>
77
</user>
88
<user>
9-
<name><![CDATA[<h1>Providenci Bednar</h1>]]></name>
10-
<email>amari30@example.com</email>
9+
<name><![CDATA[<h1>Golden Sawayn</h1>]]></name>
10+
<email>jamison.ritchie@example.net</email>
1111
</user>
1212

1313
</cdata_directive>

docs/snippets/advanced-directive-mixed.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
<mixed_directive>
33

44
<user>
5-
<name>Celestino Ledner</name>
5+
<name>Dr. Hudson Waters</name>
66
<some>
77
<first>Foo</first>
8-
<second>katheryn80@example.net</second>
8+
<second>macejkovic.lois@example.net</second>
99
</some>
1010
</user>
1111
<user>
12-
<name>Dr. Tyrel Walter MD</name>
12+
<name>Scarlett Walter</name>
1313
<some>
1414
<first>Foo</first>
15-
<second>maggie70@example.net</second>
15+
<second>ahaag@example.org</second>
1616
</some>
1717
</user>
1818

docs/snippets/advanced-directive-value.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
<value_directive>
33

44
<user>
5-
<name>Ignatius Schroeder</name>
6-
<contact type="email">weimann.maegan@example.org</contact>
5+
<name>Eldon Lind IV</name>
6+
<contact type="email">rlarkin@example.org</contact>
77
</user>
88
<user>
9-
<name>Dr. William Wintheiser II</name>
10-
<contact type="email">gottlieb.curt@example.com</contact>
9+
<name>Miss Marcia Ebert Jr.</name>
10+
<contact type="email">mayert.zackary@example.net</contact>
1111
</user>
1212

1313
</value_directive>
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<attribute>
33

4-
<user created_at="2025-09-05T02:18:14+00:00">
4+
<user created_at="2025-09-05T19:34:02+00:00">
55
<id>1</id>
6-
<name>Mr. Vincenzo Daugherty</name>
6+
<name>Dr. Rory Streich I</name>
77
</user>
8-
<user created_at="2025-09-05T02:18:14+00:00">
8+
<user created_at="2025-09-05T19:34:02+00:00">
99
<id>2</id>
10-
<name>Dolly Abernathy</name>
10+
<name>Dr. Nikko Oberbrunner</name>
1111
</user>
1212

1313
</attribute>

docs/snippets/advanced-element-header-footer.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33

44
<user>
55
<id>1</id>
6-
<name>Layla Wisoky PhD</name>
6+
<name>Ryann Effertz</name>
77
</user>
88
<user>
99
<id>2</id>
10-
<name>Pink Lang</name>
10+
<name>Emely Ziemann MD</name>
1111
</user>
1212

1313
</header_footer>

0 commit comments

Comments
 (0)