Change JSON detection method to allow more JSON synthax.