更新时间:2023-02-19 13:59:38
是的,还有一种选择.您可以使用JSON或XML的形式发送或接收查询选项,而不必使用不推荐使用的构建器.
Yes, there is an alternative. You can send or receive query options as JSON or XML instead of using the deprecated builder.
为了扩展一点,QueryOptionsManager.writeOptions()方法接受任何实现QueryOptionsWriteHandle标记接口的类.除了QueryOptionsHandle类之外,实现类还包括JSON或XML的写句柄.
To expand a bit, the QueryOptionsManager.writeOptions() method accepts any class that implements the QueryOptionsWriteHandle marker interface. Besides the QueryOptionsHandle class, implementing classes include the write handles for JSON or XML.
类似地,readOptions()方法接受实现QueryOptionsReadHandle标记接口的类,其中包括JSON或XML的读取句柄.
Similarly, the readOptions() method accepts the classes that implement the QueryOptionsReadHandle marker interface, which include the read handles for JSON or XML.