merge rest and json controller