normalize json responses