Skip to content

JsonParseNode.GetEnumValue doesn't respect json converters from KiotaJsonSerializationContext.Options.Converters #574

@AlexeyRokhin

Description

@AlexeyRokhin

Method JsonParseNode.GetEnumValue doesn't use any settings provided in KiotaJsonSerializationContext.Options. It just reads a string value of the _jsonNode. I'd like to have ability to use json converters provided in KiotaJsonSerializationContext.Options.Converters.
In some cases, we have numbers instead of strings that causes an exception. So, it would be great to be able to use our custom converters that can convert from numbers and strings to enums. Another option is to make JsonParseNode.GetEnumValue be able to work with both number and string by just checking _jsonNode.ValueKind (without using custom converters).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Needs Triage 🔍

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions