Hateos builder and json response for controller