我正在使用 python-eve,我想在模式文件 (.json) 中添加一些注释。所以直到现在我尝试了不同的评论风格:
/*TYPE_OF_REFERENCE_MAPPING = {
'ABST': 'Abstract',
'ADVS': 'Audiovisual material',
'AGGR': 'Aggregated Database',
'ANCIENT': 'Ancient Text',
'ART': 'Art Work',
...
}*/
//TYPE_OF_REFERENCE_MAPPING = {
// 'ABST': 'Abstract',
// 'ADVS': 'Audiovisual material',
// 'AGGR': 'Aggregated Database',
// 'ANCIENT': 'Ancient Text',
// 'ART': 'Art Work',
// ...
#TYPE_OF_REFERENCE_MAPPING = {
# 'ABST': 'Abstract',
# 'ADVS': 'Audiovisual material',
# 'AGGR': 'Aggregated Database',
# 'ANCIENT': 'Ancient Text',
# 'ART': 'Art Work',
# ...
#}
都产生错误:
/api/settings.py", line 25, in <module>
cite_schema = json.load(f)
File "/usr/lib/python2.7/json/__init__.py", line 290, in load
**kw)
File "/usr/lib/python2.7/json/__init__.py", line 338, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 369, in decode
raise ValueError(errmsg("Extra data", s, end, len(s)))
ValueError: Extra data: line 233 column 1 - line 238 column 10 (char 3943 - 4111)