update how handler return json encoder & decoder