JSON API of command line LanguageTool

Where is the JSON API of the LanguageTool command line tool documented?

The usage of the command line tools says:

  --json                   print results as JSON

Ideally, it could give the URL of the JSON spec.

My Vim plugin still uses the XML API which has been marked as deprecated for a while.
It’s about time switch it to the JSON API.

Unlike the XML API, the JSON API does not provide the line & column numbers.
Instead, I see it provide “offset” and “length” (presumably counted in characters from the start of the document, although I don’t know how it e.g. count Unicode composing or characters. I could experiment to find out, but I’m hoping it’s documented somewhere. The fact that it does not provide the same info as XML is a bit annoying, :frowning: Why not add the line & column numbers in JSON API?

It’s at LanguageTool HTTP API. We removed/deprecated lines/columns some day because it caused issues with the definition of what a line is (e.g. \n vs \r\n line endings).

Replying to this old thread.
I don’t see the documentation of the json output (I only see an example).
For example, it’s not so clear how`offset & length are counted:

I can experiment to figure it out of course, but an API documentation should be less ambiguous IMO.