Forum OpenACS Q&A: Re: providing RESTful apis

8: Re: providing RESTful apis (response to 1)
Posted by Antonio Pisano on
Personally, I would prefer tDOM nowadays as it provides an efficient parser, with a standardized object representation which makes it easy e.g. to convert JSON to XML and vice-versa. This makes also the code less OpenACS-specific.

What might be sometimes harder with tDOM is coping with broken markup or json: even if options are there to mitigate this, tDOM will just not swallow everything you throw at it. In this cases, some hamfisted string parsing does the trick, for me at least. Not sure how tolerant the json-procs are.

In the end, to me there is nothing wrong with the json-procs if they float your boat, is a matter of taste :-)