Skip to content

Yaml.LoadFromString (and others) are broken due to namespace keyword. #208

Closed
@twitchax

Description

@twitchax

V1ObjectMetadata defines the namespace property as follows.

[JsonProperty(PropertyName = "namespace")]
public string NamespaceProperty { get; set; }

This is likely because namespace is a reserved keyword in C#. However, YamlDotNet does not respect the JsonProperty attribute, so these deserializers fail when they come across namespace in the Yaml.

The best fix would be to either use an attribute that YamlDotNet understands, or to rename this property to Namespace, since C# doesn't care if the N is capitalized. Lastly, to avoid confusion, this property to could be marked with the @.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions