aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/json/JSONSerializer.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/juick/json/JSONSerializer.java')
-rw-r--r--src/main/java/com/juick/json/JSONSerializer.java54
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;
- }
-}