Why is app not returning JSON?