OleVik/grav-plugin-twigfeeds

Enh. idea: support for JSON formatted feeds

Closed this issue · 2 comments

It shouldn't be hard to do, should it?

Whilst not difficult, as JSON is by far a superior format to XML, it is outside of the scope of this plugin. This is for three reasons: First, well-formatted JSON can be parsed by PHP itself, and easily transported to Twig. Second, the library that powers this plugin - picoFeed - does not handle JSON or give any benefit to such parsing. Third, and most importantly. JSON-formatted feeds do not always follow the same naming-conventions as XML do for feeds. If they do, translating them to XML at source or through a middleman would make them immediately usable with the plugin - thus there is not an efficiency-gain from creating this middleman in the plugin itself, rather is a superfluous overhead.

Thus, the only benefit from utilizing the plugin for JSON would be caching. And such caching could more easily be facilitated without the overhead of the plugin and the library.