Reads a list of flags from a JSON/YAML document and converts them to our internal representation.
See Implementation