Coder Social home page Coder Social logo

Comments (4)

EdwardCooke avatar EdwardCooke commented on June 3, 2024

If there is a field in the yaml then that field/property needs to exist in the class you are deserializing. I believe there is a method you can call on the deserializerbuilder to skip that check. I think it’s named something like ignoremissingfields.

from yamldotnet.

graviaDaemon avatar graviaDaemon commented on June 3, 2024

The field "hero_settings" exists both in the Yaml as well as the Class I'm deserializing, when I would use `IgnoreMissingFields()" it would skip that one entirely no? That's not what I want though. But if you look at the fiddle, it is a nested class.

Edit:
What I've noticed after fiddling around a bit with converting yaml to json, is that the "hero_settings" property in the yaml, does not seem to parse a few of its properties.

if you look at my original post, the yaml example I posted.
When I console.writeline the yaml output, I get the following:

hero_settings:
   subtitle: test meuk
client_header:
   subtitle: of us
services_header:
   subtitle: services
   title: expertise
about_header:
   subtitle: about
   - leadmct: true
     mvp: true
     subtitle: manager
partnerships_header:
   subtitle: partners

Which means it already skipped a few properties.

from yamldotnet.

EdwardCooke avatar EdwardCooke commented on June 3, 2024

Just looked at your fiddle, can you try it without the naming convention line and see if that works?

from yamldotnet.

EdwardCooke avatar EdwardCooke commented on June 3, 2024

Did removing the naming convention fix it?

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.