no2
New Contributor III

Thanks for the response @Manoj5 - I had to use this "safeToJson()" option too because all of the previous suggestions in this thread were erroring out for me with a message like "py4j.security.Py4JSecurityException: Method public java.lang.String com.databricks.backend.common.rpc.CommandContext.toJson() is not whitelisted on class class com.databricks.backend.common.rpc.CommandContext"

Also, as a more general comment, it's incredibly frustrating that none of this is documented, or if it is, it's organized so poorly that I cannot find it.