read categories information from the configuration
[pnews.git] / war / src / main / java / pnews / servlet / JSON.java
index 0a9b8ce..a36367e 100644 (file)
@@ -1,12 +1,10 @@
 package pnews.servlet;
 
-import java.io.IOException;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
 import com.google.gson.Gson;
 import com.google.gson.JsonObject;
-import com.rometools.rome.io.FeedException;
 
 import pnews.Article;
 import pnews.Category;
@@ -36,7 +34,7 @@ public class JSON {
                 
                 for (Category cat: cats)
                         try {
-                                jcategories.addProperty(cat.getName(),
+                                jcategories.addProperty(cat.getLabel(),
                                                         articles.length);
                         } catch (IllegalArgumentException e) {
                                 LOG.log(Level.SEVERE, "Fail to retrieve articles", e);