Package org.exoplatform.json

Examples of org.exoplatform.json.JSONService


   public void setUp() throws Exception
   {
      if (service_ != null)
         return;
      service_ = new JSONService();
   }
View Full Code Here


         applicationType = new ApplicationType<?>[0];
      List<ApplicationCategory> appCategories = prService.getApplicationCategories(remoteUser, applicationType);
      ApplicationCategoryToJSONPlugin toJSON = new ApplicationCategoryToJSONPlugin();

      StringBuilder value = new StringBuilder();
      JSONService jsonService = new JSONService();
      jsonService.register(ApplicationCategory.class, toJSON);

      if (appCategories.size() < 1)
         return value;

      value.append("{\n").append("  applicationRegistry : {\n");
      for (int i = 0; i < appCategories.size(); i++)
      {
         ApplicationCategory category = appCategories.get(i);
         jsonService.toJSONScript(category, value, 1);
         if (i < appCategories.size() - 1)
            value.append("   ,\n");
      }
      value.append("  }\n").append("}\n");
View Full Code Here

TOP

Related Classes of org.exoplatform.json.JSONService

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.