diff options
author | 2016-07-07 15:13:47 +0300 | |
---|---|---|
committer | 2016-07-07 15:13:47 +0300 | |
commit | e5c8298beee5dde90ca98cc4707faac4bf0e2f0c (patch) | |
tree | 10178a0103ae8ac17849e56914b87b0ee681d0ba /src/main/java/com/juick/json/JSONSerializer.java | |
parent | d85424021a63c1519e18bd6518ad3424de61fb9f (diff) |
reorganize project
Diffstat (limited to 'src/main/java/com/juick/json/JSONSerializer.java')
-rw-r--r-- | src/main/java/com/juick/json/JSONSerializer.java | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/src/main/java/com/juick/json/JSONSerializer.java b/src/main/java/com/juick/json/JSONSerializer.java deleted file mode 100644 index 142cacf0..00000000 --- a/src/main/java/com/juick/json/JSONSerializer.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package com.juick.json; - -import java.text.ParseException; -import java.util.Iterator; -import java.util.List; -import org.json.JSONObject; - -/** - * - * @author vt - * @param <T> - */ -public abstract class JSONSerializer<T> { - - /** - * - * @param json - * @return - */ - public abstract T deserialize(JSONObject json) throws ParseException; - - /** - * - * @param obj - * @return - */ - public abstract JSONObject serialize(T obj); - - /** - * - * @param objs - * @return - */ - public String serializeList(List<T> objs) { - String json = "["; - - Iterator<T> i = objs.iterator(); - while (i.hasNext()) { - T m = i.next(); - if (json.length() > 1) { - json += ","; - } - json += serialize(m).toString(); - } - - json += "]"; - return json; - } -} |