The 'right' way to do it would be to create a custom module that brought a Java YAML parser into scope - it looks like the two main candidates are Jackson or 'snakeyaml'.
The 'easy' way to do it would be to use the 'hack' described here:
If you drop the snakeyaml .jar file in the right location, the gateway will automatically load it to the classpath on the next restart, which will then make it available from scripting.