json encoding for other types (e.g decimal)