Handle expiry correctly in json response

Go treats json numbers as float64 not int. Previously json response
expiry information was ignored since it was expected to be an int.
Merge pull request #50 from snikch/fix-json-expiry

Handle expiry correctly in json response