feed-io v2.4 : Json serialisation

In version 2.4, feed-io introduces the ability to convert feeds in valid JSON string :


$feedIo = \FeedIo\Factory::create()->getFeedIo();

$feed = $feedIo->read('http://php.net/feed.atom')->getFeed();

echo json_encode($feed);

The whole feed is exported in the JSON string, including medias, categories and additional elements.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s