Added JSON detection support.