package edu.mssm.pharm.maayanlab.Enrichr;

import java.lang.reflect.Type;

import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonSerializationContext;
import com.google.gson.JsonSerializer;

public class ListAdapter implements JsonSerializer<List> {

	@Override
	public JsonElement serialize(List list, Type type, JsonSerializationContext jsc) {
		JsonObject jsonObject = new JsonObject();
		jsonObject.addProperty("list_id", Shortener.encode(list.getListid()));
		jsonObject.addProperty("description", list.getDescription());
		jsonObject.addProperty("passkey", list.getPasskey());
		jsonObject.add("created", jsc.serialize(list.getCreated()));
		return jsonObject;
	}

}

@@ -1,8 +1,129 @@
+/**%0D%0A * JsonSerializer object that helps serialize List%0D%0A * %0D%0A * @author%09%09Edward Y. Chen%0D%0A * @since%09%0902/25/2013 %0D%0A */%0D%0A%0D%0A
 package 
@@ -630,24 +630,78 @@
 tListid()));
+%09// Don't show int count, show encoded version instead
 %0D%0A%09%09jsonObje

Add comments