public MapField(string key, string fieldName = null, bool required = true, string ignoreIfValue = null)
{
this.key = key;
this.fieldName = fieldName ?? key;
this.required = required;
this.ignoreIfValue = ignoreIfValue;
field = typeof(Map).GetField(this.fieldName);
property = typeof(Map).GetProperty(this.fieldName);
if (field == null && property == null)
throw new InvalidOperationException("Map does not have a field/property " + fieldName);
var t = field != null ? field.FieldType : property.PropertyType;
type = t == typeof(List<MiniYamlNode>) ? Type.NodeList :
t == typeof(MiniYaml) ? Type.MiniYaml : Type.Normal;
}