fix: don't write empty list in json