import json def austin(): try: json_data = "" json.loads(json_data) except Exception as e: print repr(e) if __name__ == '__main__': austin()
输出结果:ValueError('No JSON object could be decoded',)
import json def austin(): try: json_data = "" json.loads(json_data) except Exception as e: print repr(e) if __name__ == '__main__': austin()
输出结果:ValueError('No JSON object could be decoded',)