Hi!

I'm working on a package that must convert data to and from JSON.  For this,
it can use either the rjson package, or preferably, the faster RJSONIO
package.

I have two related questions about this.

First, how can I specify that the package depends on *either* RJSONIO *or*
rjson?  (I.e. both are not required.)

Second, what's the best-practice R idiom for such conditional loading?  I.e.
I'm looking for R's equivalent of Python's

>>> try:
...     import json
... except ImportError:
...     import simplejson as json

Thanks!

kynn

	[[alternative HTML version deleted]]

