bpa wrote: > There are already libraries for JSON to Perl and I use them for other > data such as the realtime metadata - so no need for any extra work.
I realise that, but earlier you said: > JSON also has some quirks compared to XML so it is never just a quick > change of library call from "XMLin" to "from_json" as there are > different ways of handling data structures (arrays vs list), missing > items and defaults values. I was wondering whether it would be possible to bridge the gap between the array / list mismatch, defaults, etc., massaging the JSON output into a format that the existing parsers would all understand because it mimicked the output of the XML reader. Whether this is feasible seems, unfortunately, to be a moot point, if all the relevant feeds have been removed. For the ".inc" feed that remains, it looks like an HTML reader is what would be needed now, unless the XML reader can be made to understand it. The HTML that is sent does appear to be a well-formed (in the XML sense and when it is enclosed in a single root element) fragment of HTML rather than a complete web page. Without all the guff that web pages normally come with, perhaps this would be less onerous to process and (I hesitate to suggest) not really screen scraping in the usually understood sense of the phrase. ------------------------------------------------------------------------ BobSammers's Profile: http://forums.slimdevices.com/member.php?userid=66026 View this thread: http://forums.slimdevices.com/showthread.php?t=72709 _______________________________________________ plugins mailing list [email protected] http://lists.slimdevices.com/mailman/listinfo/plugins
