html - flask background passes a null to the front end
扔个三星炸死你2017-06-22 11:51:24
0
1
928
The flask backend passes the value to the front-end javascript and passes a null, such as ['Global',null,0,0]. If you use str to pass it, it will be ['Global','null',0,0], yes What can I do?
In the standard JSON format, the
null
value is included.Python’s JSON library can parse
null
values normally.https://docs.python.org/3/lib...
will parse
None
tonull
.And the front-end’s
JSON.pars
e can handlenull
values normally.