factor parsing code into deserialize.r
move get to tsd_get