Skip to content
Discussion options

You must be logged in to vote

You would use the .WithTagMapping method on the DeserializerBuilder.
You can do string instead of object and get the same result, just depends on what you want it to be in the end result.
For example:

var yaml = """
    variables:
      JAVA_JDK_VERSION: 17
      BUILD_NUMBER_OFFSET: 500

    include:
      - project: "eng-systems/templates"
        file: "/build-types/java-lambda.yml"

    octopus-deploy-release:
      rules:
        - !reference [.run_never, rules]
    """;

var deserializer = new DeserializerBuilder()
        .WithNamingConvention(CamelCaseNamingConvention.Instance)
        .WithAttemptingUnquotedStringTypeDeserialization()
        .WithTagMapping("!reference", typeof(o…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by marais-vzc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants