REST-45. Fix the deserializer to accept simple and complex schemas.

Allow the writer schema to be specified as a JSON object instead of
a JSON string that has to be quoted which can be a pain for clients.