public String parse(String s) { Log.d(this, "Parsing " + s); SimpleJSParser simpleJSParser = new SimpleJSParser(s); simpleJSParser.parse(); String res = simpleJSParser.buf + ""; Log.d(this, "Returned " + res); return res; }
public static SFile getNewestBackupFile(SFile backupDir) { SFile src = null; Log.d("newestBackup", "Search backup " + backupDir + " *.json"); for (SFile txt : backupDir) { if (!txt.name().endsWith(".json")) continue; if (txt.name().startsWith("dot_")) continue; if (src == null || txt.lastModified() > src.lastModified()) { src = txt; } } if (src == null) Log.die("Backup not found in " + backupDir); return src; }