python - json library return non valid json for None type -


when try serialize none object using json library 'null' string not valid json according several validation tools found in json.org (jslint, json parser).

>>> import json >>> json.dumps(none) 'null' 

first correct try serializing none object? if yes should result ('{}'?)? if not solutions if want return none in web service?

null valid json string. in js console:

> json.parse('null') null 

Comments