Skip to content

Source Span Information for Deserialized Object #1077

@nex3

Description

@nex3

Is your feature request related to a problem? Please describe.

I'm deserializing a large and complex configuration file into an object using YamlDotNet's declarative deserialization. Sometimes I need to indicate errors associated with part of this configuration. Currently, I have no way of knowing where in the YAML source file a given part of the configuration object came from.

Describe the solution you'd like

Some sort of YamlSourceSpan object that I could include as a property on a deserialized object would be ideal, and/or a generic WithSpan<T> container.

Describe alternatives you've considered

I think I could probably do this by implementing a manual deserializer, but I feel like I'd be reinventing the wheel by doing so.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions