aloneguid / config

⚙ Config.Net - the easiest configuration framework for .NET developers. No BS.
MIT License
656 stars 86 forks source link

UseJsonFile - manual saving #130

Closed martin-braun closed 2 years ago

martin-braun commented 2 years ago

I just realized that this library will use the INotifyPropertyChange interface to trigger re-writting the JSON file, which is not what I want. What I need is a way to save and overwrite the file only when calling a method.

I tried to bypass this issue by using UseJsonConfig and using the methods of Newtonsoft to do the saving by myself, but this package will prevent me from modifying my config interface when I use UseJsonConfig, so I cannot bypass this without building my own class on which I map the values to.

So my conclusion is that there is no point in using this package anymore, because I'd end up with more work than just using the direct Newtonsoft-way, which is the price I have to pay in any case. Not the best situation, I should've checked everything way closer to make sure this is the right tool for my task. I'm creating this issue to suggest a manual save method when using UseJsonFile.

Thank you.

aloneguid commented 2 years ago

Agreed, if you just need json then overabstration is a wrong way to go.