private static final Logger log = LoggerFactory.getLogger(JsonVectorAdapter.class);
public static final String VECTOR = "vector";
public JsonElement serialize(Vector src, Type typeOfSrc,
JsonSerializationContext context) {
GsonBuilder builder = new GsonBuilder();
builder.registerTypeAdapter(Vector.class, new JsonVectorAdapter());
Gson gson = builder.create();
JsonObject obj = new JsonObject();
obj.add(JsonMatrixAdapter.CLASS, new JsonPrimitive(src.getClass().getName()));
obj.add(VECTOR, new JsonPrimitive(gson.toJson(src)));
return obj;
}