parse yaml with a string or port