Comments (4)
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.
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.
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.
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)
- Parser does not recognize quoted keys HOT 2
- Can't handle anchored lists HOT 11
- Cannot parse YAML file, (Line: 2, Col: 3, Idx: 6) - (Line: 2, Col: 3, Idx: 6): Exception during deserialization HOT 2
- Do you think it's useful to add some F# examples along with the C# code? HOT 4
- Schema validation support HOT 10
- Unwanted conversion from a string to a numeric value HOT 1
- missing `IDeserializer object? Deserialize(string input)` method HOT 2
- How to Serialize an object with Directives, start and end marks (---, ...)? HOT 2
- How to forcefully interpret as an array with implied key HOT 3
- YamlStream.Load with JSON with emojis (even escaped) fails: "While scanning a quoted scalar, found invalid Unicode character escape code." HOT 13
- OmitDefaults doesn't work for properties of sub-objects HOT 14
- Polymorphic deserialization - Alias $example_word cannot precede anchor declaration HOT 4
- DateTime fails Serialization/Deserialization roundtrip when JsonCompatible is on HOT 5
- Serialization/Deserialization vs strings with funny characters HOT 8
- How do I use this with multiple documents of arbitrary types? HOT 3
- RobiniaDocs API Explorer HOT 1
- Add support for including types defined in another assembly in static code generation HOT 1
- Static code generation fails to generate code for Dictionary and List which use Array values
- Type descriminator keys and casing HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yamldotnet.