try {
Gson gson;
final GsonBuilder builder = new GsonBuilder();
builder.registerTypeAdapterFactory(new EnumAdaptorFactory());
builder.registerTypeAdapter(Date.class, new DateAdapter());
builder.registerTypeAdapter(File.class, new FileAdapter());
builder.enableComplexMapKeySerialization();
builder.setPrettyPrinting();
gson = builder.create();
return gson.toJson(m);
} catch (Exception e) {