flask-smorest icon indicating copy to clipboard operation
flask-smorest copied to clipboard

Object of type function is not JSON serializable

Open dgaedcke opened this issue 2 years ago • 0 comments

seeing this error: raise TypeError(f'Object of type {o.class.name} '

from JSON module in the dump code:

with open("api.json", "w") as outfile:
    json.dump(tsApi.spec.to_dict(), outfile)

How do I find what decorator is causing spec to be unserializable...

f-sm should be doing some analysis on it's dict to verify that all the types being returned are valid JSON objects ...

dgaedcke avatar Dec 25 '22 19:12 dgaedcke