add toJSON to intervalSet