This is a patch to support the usage of JSON as the format for API Facebook responses.
Why to care? Because JSON could be desirable when passing the response for example to a Javascript code, but mainly,
because JSON reduces significantly the bandwidth usage compared to XML.
The patch makes significant changes to the Parser class, moving a good part of it to a separated file (xml_parser.rb),
and then creating a new class named JsonParser.
The format for responses can be switched in runtime at the session class (maybe it is interesting to move this to the
service class?).
I hope you find it useful.
Carlos Paramio |