add better memory saving options. this avoids to jsonify every item, even those outside the batch.