Upades for json rest controller

Make json rest controller configuration more flexible.