Get JSON from Java SearchRequest.Builder

When using the elastic search java client (8.5) with a SearchRequest.Builder() there is an easy way to the JSON that will be send to the server it’s just toString() method.
For the opensearch-java-2.4.0 client this is not working. Is there a way to get the JSON for a SearchRequest. For me this is vital in order to check if my queries are correct.
Thanks
Marc