Coder Social home page Coder Social logo

YamlMember Alias usage about yamldotnet HOT 4 CLOSED

oqo0 avatar oqo0 commented on June 3, 2024
YamlMember Alias usage

from yamldotnet.

Comments (4)

EdwardCooke avatar EdwardCooke commented on June 3, 2024

It could be the deserializerbuilder options that are set. Can you try deserializing it by itself without the configuration stuff?

something like
var yaml=….
var deserializer = new DeserializerBuilder().Build();
var o = deserializer.Deserialize<List>(yaml);

What library/code are you using to add the yaml file to the configuration object?

from yamldotnet.

oqo0 avatar oqo0 commented on June 3, 2024

I tried to deserializing it by itself and it didn't work without YamlMember attribute this time, but when I specified the Alias it worked.

Looks like you are right about deserializerbuilder options affecting this.

from yamldotnet.

oqo0 avatar oqo0 commented on June 3, 2024

I'm using generic host configuration for adding yaml file to the config object:

    builder.ConfigureAppConfiguration(options =>
    {
        options.AddYamlFile("config.yml", false);
        options.AddYamlFile("language.yml", false);
    });

This is used for a Discord.NET bot which is not supported by generic host by default, so I use Discord.Addons.Hosting for this.

from yamldotnet.

EdwardCooke avatar EdwardCooke commented on June 3, 2024

Since we've narrowed it down to whatever the library you are using to add the Yaml to your configuration is doing and not an issue with YamlDotNet, I'm going to close this issue.

from yamldotnet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.