I have finalized the convert:from-java function [1], and I have added new conversion rules for XQuery arrays [2]. As it was about time, I have also revised our documentation on Java Bindings [3].
Cheers Christian
[1] https://docs.basex.org/wiki/Conversion_Module#convert:from-java [2] https://github.com/BaseXdb/basex/issues/2020 [3] https://docs.basex.org/wiki/Java_Bindings#Data_Types
On Wed, Jun 30, 2021 at 11:29 AM Christian Grün christian.gruen@gmail.com wrote:
Thanks for testing.
Trying to use convert:from-java on a list of a custom Java object, I get: [convert:java] Java object cannot be converted: "Word(text=test, normalized=test)".
It should just marshal the Java object like is done with the Java interop in this case.
As the function triggers an explicit conversion, I’d like to inform the caller that no conversion is possible (at least for now; we may find other Java types that could be converted). I’ll certainly need to add that in the documentation.
I’m still not sure if I will keep the recursive conversion (maybe that should be controlled via an additional argument). For maps, it’s certainly helpful.