Problem statement
For serving flair Sentences over an inference API, it would be very useful to be able to serialize the Sentence to and from JSON.
Solution
Ideally, json.dumps(Sentence) should work. Or, at least, Sentence should have a to_json method and static from_json method.
Or, some simply, all relevant classes could have a from_dictstatic method, so that Sentence.from_dict(s.to_dict()) == s
Additional Context
No response