Improved JSON request detection