Added some basic JSON REST methods.