views:

51

answers:

2

One of the benefits of XML is being able to validate a document against an XSD. YAML doesn't have this feature, so how can I validate that the YAML document I open is in the format expected by my application?

A: 

I'm not aware of a python solution. But there is a ruby schema validator for YAML called kwalify. You should be able to access it using subprocess if you don't come across a python library.

ars
I'm really looking for a pythonic solution. This is always a last resort.
rioch
A: 
Lior
This looks interesting. It's not clear how well it will handle python objects that are encoded in the yaml, but it's worth a try.
rioch