Skip to content

Exposing JsonConfigurationFileParser externally as reusable JsonConfigurationParser #1074

@kehundley-fadv

Description

@kehundley-fadv

I'm working on a custom configuration extension that will need to parse a JSON text string from an API call into valid configuration data. I knew the JSON parsing functionaly must already exist since it would be needed by the JsonConfigurationProvider, and I hoped that it was exposed in a way that I could reuse it directly. However, when I looked into the code the class is internal and part of the Microsoft.Extensions.Configuration.Json project. Looking at the internal workings of the class I don't see anything that make this a "FileParser" since it only deals with an input stream, which can come from any source.

I'd like to propose that this class be exposed for reuse as a base level parser (outside of the Json File Provider), available for all configuration providers to use. Maybe in the Microsoft.Extensions.Configuration package.

I know that I can simply copy the code into my project and achieve the same effect, but I believe it would be better long-term if this could be reused by Configuration projects in a consistent manner.

Thoughts?

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