config read/write from/to json via flags