fixed export json to acknowledge empty arrays