Using Java api client with json method not found error in 7.17.1

Not able to find withJson method in any of elasticsearch request and response in version 7.17.1 where it is mentioned in all documentation. If there is no way to use it , what alternative can be used in 7.17.1 to use json string into requests from elasticsearch java api client

Version 7.17 is a long term support release, and along with bug fixes we backport some important new features to it. You should update your project to use version 7.17.6, the latest release in that branch. It has the withJson feature.

Is there no other way to use in 7.17.1?
as for for version upgrade it would be long procedure and do breaking changes along with it for the minor upgrades , so is there any other solution available as i was getting this error while directly mapping my document class object in .doc field jakarta.json.JsonException: Jackson exception

only for confirmation, if we upgrade client to 7.17.6 and server as it is on 7.17.1 will it be compatible

Unfortunately no. Now this only requires to upgrade the client library. And yes will work fine with server 7.17.1.