@@ -0,0 +1,1686 @@
+package ru.wapstart.plus1.sdk;%0A%0Aimport org.json.JSONArray;%0Aimport org.json.JSONException;%0Aimport org.json.JSONObject;%0A %0Aimport java.util.*;%0A %0Apublic class JsonHelper %7B%0A%09public static Object toJSON(Object object) throws JSONException %7B%0A%09%09if (object instanceof Map) %7B%0A%09%09%09JSONObject json = new JSONObject();%0A%09%09%09Map map = (Map) object;%0A%09%09%09for (Object key : map.keySet()) %7B%0A%09%09%09%09json.put(key.toString(), toJSON(map.get(key)));%0A%09%09%09%7D%0A%09%09%09return json;%0A%09%09%7D else if (object instanceof Iterable) %7B%0A%09%09%09JSONArray json = new JSONArray();%0A%09%09%09for (Object value : ((Iterable)object)) %7B%0A%09%09%09%09json.put(value);%0A%09%09%7D%0A%09%09%09return json;%0A%09%09%7D else %7B%0A%09%09%09return object;%0A%09%09%7D%0A%09%7D%0A%0A%09public static boolean isEmptyObject(JSONObject object) %7B%0A%09%09return object.names() == null;%0A%09%7D%0A%0A%09public static Map%3CString, Object%3E getMap(JSONObject object, String key) throws JSONException %7B%0A%09%09return toMap(object.getJSONObject(key));%0A%09%7D%0A%0A%09public static Map%3CString, Object%3E toMap(JSONObject object) throws JSONException %7B%0A%09%09Map%3CString, Object%3E map = new HashMap();%0A%09%09Iterator keys = object.keys();%0A%09%09while (keys.hasNext()) %7B%0A%09%09%09String key = (String) keys.next();%0A%09%09%09map.put(key, fromJson(object.get(key)));%0A%09%09%7D%0A%09%09return map;%0A%09%7D%0A%0A%09public static List toList(JSONArray array) throws JSONException %7B%0A%09%09List list = new ArrayList();%0A%09%09for (int i = 0; i %3C array.length(); i++) %7B%0A%09%09%09list.add(fromJson(array.get(i)));%0A%09%09%7D%0A%09%09return list;%0A%09%7D%0A%0A%09private static Object fromJson(Object json) throws JSONException %7B%0A%09%09if (json == JSONObject.NULL) %7B%0A%09%09%09return null;%0A%09%09%7D else if (json instanceof JSONObject) %7B%0A%09%09%09return toMap((JSONObject) json);%0A%09%09%7D else if (json instanceof JSONArray) %7B%0A%09%09%09return toList((JSONArray) json);%0A%09%09%7D else %7B%0A%09%09%09return json;%0A%09%09%7D%0A%09%7D%0A%7D%0A

add missed JsonHelper class