convert params to HashMap which is always serializable