Factor common JSON conversions up into client lib module.

Created by  Kris Nuttycombe  on January 13, 2015
W35DDBFYF6Z4ZPCFEO5RPAONZLYCSNTXUSTS6FIUUVZHCI6Q7GHAC
Change contents