formatting json in view