From 5b2bd7f928bbf9d3233ff029ed5c09ac46daf0de Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 28 Nov 2016 14:37:02 +0300 Subject: all components using jackson now, org.json serializer moved to compatibility tests package --- .../main/java/com/juick/json/JSONSerializer.java | 73 ---------------------- 1 file changed, 73 deletions(-) delete mode 100644 juick-core/src/main/java/com/juick/json/JSONSerializer.java (limited to 'juick-core/src/main/java/com/juick/json/JSONSerializer.java') diff --git a/juick-core/src/main/java/com/juick/json/JSONSerializer.java b/juick-core/src/main/java/com/juick/json/JSONSerializer.java deleted file mode 100644 index 3dc9e04e..00000000 --- a/juick-core/src/main/java/com/juick/json/JSONSerializer.java +++ /dev/null @@ -1,73 +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 - */ -public abstract class JSONSerializer { - - public enum URIScheme { - Plain, - Secure - } - - private URIScheme uriScheme; - - public URIScheme getUriScheme() { - return uriScheme; - } - - public void setUriScheme(URIScheme uriScheme) { - this.uriScheme = uriScheme; - } - - public JSONSerializer() { - this.uriScheme = URIScheme.Plain; - } - - /** - * - * @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 objs) { - String json = "["; - - Iterator i = objs.iterator(); - while (i.hasNext()) { - T m = i.next(); - if (json.length() > 1) { - json += ","; - } - json += serialize(m).toString(); - } - - json += "]"; - return json; - } -} -- cgit v1.2.3