a generally working deserialization routine

honors Content-Type and Accepts appropriatly