This project has moved. For the latest updates, please go here.

seralizable JSon class and subclasses

Jun 30, 2010 at 11:12 PM


I am hoping someone may point me in the best direction to achieve what i want. I am building a application that uses a plugin based system and a single config file that contains the settings for all plugins.  I was thinking of storing those settings in a Json format.  My catch is that i need to be able to store, load and update the settings of some of the plugins even when there are settings from other plugins in the file and those plugins have not been loaded and there for the classes that represent the settings of the missing plugins are not in memory.

I thought of doing a 2 level json same where i have a master setting class that contains a dictionary of plugin name to json string for that plugin but i was hoping there may be some better way with anonymous classes or base classes that could allow the loading of all the generic sort of settings and then each plugin could then maybe have a sort of extended settings class to load more specialized settings if need. i would prefer for the setting classes in the plugins to implement a base class or something so that they could easily be automatically saved to file/network without the developer needed to know anything about how it happens in the back ground.

I would need to load thousands of these configurations up so i am trying to find the best way to do so quickly and i would prefer low memory usage but speed for loading is more important.  I would also be checkingthe properties/values on the objects quite bit.  sort of searching them if that effects things at all. 

Sort of hoping someone may have done something similar to save e building an testing all the different ways to find the best.