[1.7.x] Used JsonResponse in CBV examples.

Thanks Hiroki Kiyohara and Tim Graham for the reviews.

Backport of 7579080899 from master