In that case you may write a custom code to export json using Jackson/GSON API. Obviously, you'd end up writing a lot of boilerplate code. E.g. https://www.concretepage.com/jackson-api/read-write-json-using-jackson-objectmapper-jsonparser-jsongenerator-example ,https://www.geeksforgeeks.org/convert-...