Checking text with markup in python LanguageTool

Hello Everyone,

I am new to this forum and trying to learn/use LanguageTool in python scripts for my application.

I have tried to install package and create sample script as per language-tool-python · PyPI, it works great.

As per LanguageTool Http API LanguageTool API documentation, I can send “JSON data” which text contains markups (XML or HTML)
{'annotation': [{'text': 'A '}, {'markup': '<b>'}, {'text': 'test'}, {'markup': '</b>'}]}

I also learned that in JAVA I can use AnnotatedTextBuilder() instance to build this markup and it works great, but

Is there any way to send this JSON data to python-language-tool check() method? or any other package available in python to achieve this.

Any help much appreciated.

Thanks,
Kumar