Hi Florent,
Do you have some informations about the performance penalty to do JSON conversion at the BaseX level ?
I don't think we have a specific numbers on this at it heavily depends on your data. Simplest thing will probably to give it a try for your specific data set. In general I would say it should not be a major bottleneck.
I agree with Dirk; the conversion between XML and JSON is optimized pretty well and shouldn't cause any considerable overhead.
Cheers, Christian