serve: use flask.json instead of json

For py3 string issues