switch to the Groovy json library

pull/53/head
Zlatin Balevsky 2020-06-05 20:29:39 +01:00
parent 4f626615d8
commit 76e726b520
No known key found for this signature in database
GPG Key ID: A72832072D525E41
1 changed files with 2 additions and 7 deletions

View File

@ -4,8 +4,7 @@ import java.io.File;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import org.json.simple.JSONObject; import groovy.json.JsonOutput;
import net.i2p.I2PAppContext; import net.i2p.I2PAppContext;
import net.i2p.data.Base64; import net.i2p.data.Base64;
import net.i2p.data.DataHelper; import net.i2p.data.DataHelper;
@ -199,11 +198,7 @@ public class Util {
if (!s.equals(tx)) if (!s.equals(tx))
map.put(s, tx); map.put(s, tx);
} }
try { return JsonOutput.toJson(map);
return JSONObject.toJSONString(map);
} catch (NoClassDefFoundError json2) {
return "{}"; // TODO: upgrade to json-simple 2.x
}
} }