Fix rabbit serde and add tests; fixes #794

(I'm not sure if this is the case or not-- but I think Rabbit will call this method so it needs to be able to understand the results.)