1.1.2: Account for trailing whitespace when detecting JSON responses