db to json batch