Add  YAML support

- Add yaml support to Threshold.