|
|
@ -1,6 +1,7 @@ |
|
|
|
// Copyright © 2015 Abhishek Banthia |
|
|
|
// Copyright © 2015 Abhishek Banthia |
|
|
|
|
|
|
|
|
|
|
|
import CoreModelKit |
|
|
|
import CoreModelKit |
|
|
|
|
|
|
|
import CoreLoggerKit |
|
|
|
import Foundation |
|
|
|
import Foundation |
|
|
|
|
|
|
|
|
|
|
|
struct ConfigExport { |
|
|
|
struct ConfigExport { |
|
|
@ -34,7 +35,7 @@ struct ConfigExport { |
|
|
|
var clockerPrefs: [String: Any] = [:] |
|
|
|
var clockerPrefs: [String: Any] = [:] |
|
|
|
for (key, value) in dictionaryRep { |
|
|
|
for (key, value) in dictionaryRep { |
|
|
|
if selectedKeys.contains(key) { |
|
|
|
if selectedKeys.contains(key) { |
|
|
|
print("Key is \(key) and value is \(value)") |
|
|
|
Logger.info("Config Export: Key is \(key) and value is \(value)") |
|
|
|
clockerPrefs[key] = value |
|
|
|
clockerPrefs[key] = value |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -73,7 +74,7 @@ struct ConfigExport { |
|
|
|
let json = try JSONSerialization.data(withJSONObject: clockerPrefs, options: .prettyPrinted) |
|
|
|
let json = try JSONSerialization.data(withJSONObject: clockerPrefs, options: .prettyPrinted) |
|
|
|
print(json) |
|
|
|
print(json) |
|
|
|
} catch { |
|
|
|
} catch { |
|
|
|
print("Failure Observed \(error.localizedDescription)") |
|
|
|
Logger.info("Failure Observed \(error.localizedDescription)") |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|