func (c *Config) UnmarshalJSON(data []byte) error {
	t := make(map[string]json.RawMessage)
	if err := json.Unmarshal(data, &t); err != nil {
		return err
	}
	for k, v := range t {
		switch k {
		case "work_manager_queue_size":
			if err := json.Unmarshal(v, &(c.WorkManagerQueueSize)); err != nil {
				return fmt.Errorf("%v (while parsing 'scheduler::work_manager_queue_size')", err)
			}
		case "work_manager_pool_size":
			if err := json.Unmarshal(v, &(c.WorkManagerPoolSize)); err != nil {
				return fmt.Errorf("%v (while parsing 'scheduler::work_manager_pool_size')", err)
			}
		default:
			return fmt.Errorf("Unrecognized key '%v' in global config file while parsing 'scheduler'", k)
		}
	}
	return nil
}
UnmarshalJSON unmarshals valid json into a Config.  An example Config can be found
at github.com/intelsdi-x/snap/blob/master/examples/configs/snap-config-sample.json
package scheduler
import (
	"encoding/json"
	"fmt"
)
const (
	defaultWorkManagerQueueSize uint = 25
	defaultWorkManagerPoolSize  uint = 4
)
type Config struct {
	WorkManagerQueueSize uint `json:"work_manager_queue_size"yaml:"work_manager_queue_size"`
	WorkManagerPoolSize  uint `json:"work_manager_pool_size"yaml:"work_manager_pool_size"`
}
const (
	CONFIG_CONSTRAINTS = `
			"scheduler": {
				"type": ["object", "null"],
				"properties" : {
					"work_manager_queue_size" : {
						"type": "integer",
						"minimum": 1
					},
					"work_manager_pool_size" : {
						"type": "integer",
						"minimum": 1
					}
				},
				"additionalProperties": false
			}
	`
)
func GetDefaultConfig() *Config {
	return &Config{
		WorkManagerQueueSize: defaultWorkManagerQueueSize,
		WorkManagerPoolSize:  defaultWorkManagerPoolSize,
	}
}