I'm trying to create / read a MongoDB configuration file through C#.
The format is YAML and some nodes are deeply nested like this:
storage.wiredTiger.engineConfig.cacheSizeGB : 5
From the getting started documentation, I figured I should create new classes for storage
, wiredTiger
, engineConfig
which will ultimately hold a single property, cacheSizeGB
. I feel like I'm writing more boilerplate classes just to define the class hierarchy.
Is there a simpler way that requires less class definitions?