Package com.google.gson.internal

Examples of com.google.gson.internal.LinkedTreeMap$LinkedTreeMapIterator


        Gson gson=new Gson();
        Hashtable table = new Hashtable<String, String>();
        table = (Hashtable<String, String>) gson.fromJson(json, table.getClass());

        ArrayList l = (ArrayList) table.get("data");
        LinkedTreeMap d = (LinkedTreeMap) l.get(0);
        Hashtable<String,Object> ht = new Hashtable<String,Object>();



        ht.putAll(d);
View Full Code Here


      Scanner s = new Scanner(inputStream).useDelimiter("\\A");
      String string = s.next();
      s.close();
      if(!Configs.CHECK_FOR_UPDATES) return;
      Gson gson = new Gson();
      LinkedTreeMap part = gson.fromJson(string, LinkedTreeMap.class);
      Boolean hasNew = (Boolean) part.get("new");
      if(hasNew) {
        VersionChecker.hasNewVersion = true;
        VersionChecker.newVersion = Integer.toString(Double.valueOf(part.get("build").toString()).intValue());
        LogisticsPipes.log.info("New LogisticsPipes" + (LPConstants.DEV_BUILD?"-Dev":"") + " version found: #" + Double.valueOf(part.get("build").toString()).intValue());
        LinkedTreeMap changeLog = (LinkedTreeMap) part.get("changelog");
        List<String> changeLogList = new ArrayList<String>();
        if(changeLog != null) {
          for(Object oVersion:changeLog.keySet()) {
            String build = oVersion.toString();
            changeLogList.add(new StringBuilder(build).append(": ").toString());
            List<String> sub = (List<String>) changeLog.get(build);
            for(String msg:sub) {
              if(msg.length() > 60) {
                boolean first = true;
                while(!msg.isEmpty()) {
                  int splitAt = msg.substring(0, Math.min(first ? 60 : 55, msg.length())).lastIndexOf(' ');
View Full Code Here

TOP

Related Classes of com.google.gson.internal.LinkedTreeMap$LinkedTreeMapIterator

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.