} else if (in.getName().endsWith(".json") || in.getName().endsWith(".JSON")) {
try {
ExportSerializer export_manager = MakiDI.get().fromStock(ExportSerializer.class);
ReadableRoot readable = (ReadableRoot) export_manager.toNode(in.toString());
String secret_key = readable.getKey();
if (secret_key == null || secret_key.length() == 0) {
throw new Exception("Invalid key in json file.");
}
KeySecretData ksd = new KeySecretData();
ksd.setKey(getUTF8Bytes(secret_key));
ksd.setProperties(new HashMap(readable.getProperties()));
ksd.encrypt(master_username, maki_file_key);
this.GEN_KEY = ksd.getKey();
enc_map = Login.firstEncyptedMap(master_password);
enc_map.setSettings(new HashMap(readable.getSettings()));
Map<String, Readable> map_read = readable.getMap();
Iterator<String> keys = map_read.keySet().iterator();
while (keys.hasNext()) {
String plugin_id = keys.next();