add json marshal/unmarshal functions