Parse resource JSON.

* DiatropikonError can now wrap other errors, at least as far as
  message is concerned.
* Make JSON dumpable from resources without our private fields showing
  up.