add: serialize dataflow into JSON