当前位置: 首页>>代码示例>>Java>>正文


Java JdomParser类代码示例

本文整理汇总了Java中argo.jdom.JdomParser的典型用法代码示例。如果您正苦于以下问题:Java JdomParser类的具体用法?Java JdomParser怎么用?Java JdomParser使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


JdomParser类属于argo.jdom包,在下文中一共展示了JdomParser类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: func_110735_a

import argo.jdom.JdomParser; //导入依赖的package包/类
public static WorldTemplateList func_110735_a(String p_110735_0_) {
   WorldTemplateList var1 = new WorldTemplateList();
   var1.field_110736_a = new ArrayList();

   try {
      JsonRootNode var2 = (new JdomParser()).parse(p_110735_0_);
      if(var2.isArrayNode(new Object[]{"templates"})) {
         Iterator var3 = var2.getArrayNode(new Object[]{"templates"}).iterator();

         while(var3.hasNext()) {
            JsonNode var4 = (JsonNode)var3.next();
            var1.field_110736_a.add(WorldTemplate.func_110730_a(var4));
         }
      }
   } catch (InvalidSyntaxException var5) {
      ;
   } catch (IllegalArgumentException var6) {
      ;
   }

   return var1;
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:23,代码来源:WorldTemplateList.java

示例2: func_130095_a

import argo.jdom.JdomParser; //导入依赖的package包/类
public static PendingInvitesList func_130095_a(String p_130095_0_) {
   PendingInvitesList var1 = new PendingInvitesList();

   try {
      JsonRootNode var2 = (new JdomParser()).parse(p_130095_0_);
      if(var2.isArrayNode(new Object[]{"invites"})) {
         Iterator var3 = var2.getArrayNode(new Object[]{"invites"}).iterator();

         while(var3.hasNext()) {
            JsonNode var4 = (JsonNode)var3.next();
            var1.field_130096_a.add(PendingInvite.func_130091_a(var4));
         }
      }
   } catch (InvalidSyntaxException var5) {
      ;
   }

   return var1;
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:20,代码来源:PendingInvitesList.java

示例3: func_111222_a

import argo.jdom.JdomParser; //导入依赖的package包/类
public static BackupList func_111222_a(String p_111222_0_) {
   BackupList var1 = new BackupList();
   var1.field_111223_a = new ArrayList();

   try {
      JsonRootNode var2 = (new JdomParser()).parse(p_111222_0_);
      if(var2.isArrayNode(new Object[]{"backups"})) {
         Iterator var3 = var2.getArrayNode(new Object[]{"backups"}).iterator();

         while(var3.hasNext()) {
            JsonNode var4 = (JsonNode)var3.next();
            var1.field_111223_a.add(Backup.func_110724_a(var4));
         }
      }
   } catch (InvalidSyntaxException var5) {
      ;
   } catch (IllegalArgumentException var6) {
      ;
   }

   return var1;
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:23,代码来源:BackupList.java

示例4: func_98161_a

import argo.jdom.JdomParser; //导入依赖的package包/类
public static ValueObjectList func_98161_a(String p_98161_0_) {
   ValueObjectList var1 = new ValueObjectList();
   var1.field_96430_d = new ArrayList();

   try {
      JsonRootNode var2 = (new JdomParser()).parse(p_98161_0_);
      if(var2.isArrayNode(new Object[]{"servers"})) {
         Iterator var3 = var2.getArrayNode(new Object[]{"servers"}).iterator();

         while(var3.hasNext()) {
            JsonNode var4 = (JsonNode)var3.next();
            var1.field_96430_d.add(McoServer.func_98163_a(var4));
         }
      }
   } catch (InvalidSyntaxException var5) {
      ;
   } catch (IllegalArgumentException var6) {
      ;
   }

   return var1;
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:23,代码来源:ValueObjectList.java

示例5: func_130095_a

import argo.jdom.JdomParser; //导入依赖的package包/类
public static PendingInvitesList func_130095_a(String par0Str)
{
    PendingInvitesList pendinginviteslist = new PendingInvitesList();

    try
    {
        JsonRootNode jsonrootnode = (new JdomParser()).parse(par0Str);

        if (jsonrootnode.isArrayNode(new Object[] {"invites"}))
        {
            Iterator iterator = jsonrootnode.getArrayNode(new Object[] {"invites"}).iterator();

            while (iterator.hasNext())
            {
                JsonNode jsonnode = (JsonNode)iterator.next();
                pendinginviteslist.field_130096_a.add(PendingInvite.func_130091_a(jsonnode));
            }
        }
    }
    catch (InvalidSyntaxException invalidsyntaxexception)
    {
        ;
    }

    return pendinginviteslist;
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:27,代码来源:PendingInvitesList.java

示例6: func_98162_a

import argo.jdom.JdomParser; //导入依赖的package包/类
public static McoServerAddress func_98162_a(String par0Str)
{
    McoServerAddress mcoserveraddress = new McoServerAddress();

    try
    {
        JsonRootNode jsonrootnode = (new JdomParser()).parse(par0Str);
        mcoserveraddress.field_96417_a = jsonrootnode.getStringValue(new Object[] {"address"});
    }
    catch (InvalidSyntaxException invalidsyntaxexception)
    {
        ;
    }
    catch (IllegalArgumentException illegalargumentexception)
    {
        ;
    }

    return mcoserveraddress;
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:21,代码来源:McoServerAddress.java

示例7: func_98169_a

import argo.jdom.JdomParser; //导入依赖的package包/类
public static ValueObjectSubscription func_98169_a(String par0Str)
{
    ValueObjectSubscription valueobjectsubscription = new ValueObjectSubscription();

    try
    {
        JsonRootNode jsonrootnode = (new JdomParser()).parse(par0Str);
        valueobjectsubscription.field_98171_a = Long.parseLong(jsonrootnode.getNumberValue(new Object[] {"startDate"}));
        valueobjectsubscription.field_98170_b = Integer.parseInt(jsonrootnode.getNumberValue(new Object[] {"daysLeft"}));
    }
    catch (InvalidSyntaxException invalidsyntaxexception)
    {
        ;
    }
    catch (IllegalArgumentException illegalargumentexception)
    {
        ;
    }

    return valueobjectsubscription;
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:22,代码来源:ValueObjectSubscription.java

示例8: getServicesJsonRootNode

import argo.jdom.JdomParser; //导入依赖的package包/类
/**
 * Gets CloudFoundry services from "VCAP_SERVICES" environment variable as a JsonRootNode.
 * @return CloudFoundry services from "VCAP_SERVICES" environment variable as a JsonRootNode.
 */
protected static JsonRootNode getServicesJsonRootNode() {
	JsonRootNode root = null;
	String services = System.getenv("VCAP_SERVICES");
	
	if(services != null && !services.isEmpty()) {
		try {
			root = new JdomParser().parse(services);
		} catch (InvalidSyntaxException e) {
			throw new RuntimeException(e);
		}
	} else {
		throw new RuntimeException("Error getting configuration from CloudFoundry.");
	}
	
	return root;
}
 
开发者ID:alejandro-du,项目名称:enterprise-app,代码行数:21,代码来源:CloudFoundry.java

示例9: VersionInfo

import argo.jdom.JdomParser; //导入依赖的package包/类
public VersionInfo()
{
    InputStream installProfile = getClass().getResourceAsStream("/cauldron_libs.json");
    JdomParser parser = new JdomParser();

    try
    {
        versionData = parser.parse(new InputStreamReader(installProfile, Charsets.UTF_8));
    }
    catch (Exception e)
    {
        throw Throwables.propagate(e);
    }
}
 
开发者ID:UraniumMC,项目名称:Uranium,代码行数:15,代码来源:VersionInfo.java

示例10: jsonFromString

import argo.jdom.JdomParser; //导入依赖的package包/类
/**
 * Parse a json from a string
 * @param input the string representing the JSON object
 * @return the root node of the json object, or null if the string is of invalid syntax
 */
public static JsonRootNode jsonFromString(String input) {
	try {
		return new JdomParser().parse(input);
	} catch (InvalidSyntaxException e) {
		return null;
	}
}
 
开发者ID:repeats,项目名称:Repeat,代码行数:13,代码来源:JSONUtility.java

示例11: prettyPrintJsonString

import argo.jdom.JdomParser; //导入依赖的package包/类
/**
 * Pretty print json string.
 * @param uglyJson
 * @return prettyfied json if possible, ugly one otherwise
 * I found Argo is the only one which can format a json string the way I want.
 * Argo: http://argo.sourceforge.net/documentation.html
 */
public static String prettyPrintJsonString(String uglyJson)
{
    try
    {
        JsonRootNode jsonRootNode = new JdomParser().parse(uglyJson);
        JsonFormatter jsonFormatter = new PrettyJsonFormatter();
        String prettyJson = jsonFormatter.format(jsonRootNode);
        return prettyJson;
    }
    catch(Exception e)
    {
        return uglyJson;
    }
}
 
开发者ID:muquit,项目名称:gwtoauthlogindemo,代码行数:22,代码来源:ServerUtils.java

示例12: func_98165_c

import argo.jdom.JdomParser; //导入依赖的package包/类
public static McoServer func_98165_c(String p_98165_0_) {
   McoServer var1 = new McoServer();

   try {
      var1 = func_98163_a((new JdomParser()).parse(p_98165_0_));
   } catch (InvalidSyntaxException var3) {
      ;
   }

   return var1;
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:12,代码来源:McoServer.java

示例13: func_98162_a

import argo.jdom.JdomParser; //导入依赖的package包/类
public static McoServerAddress func_98162_a(String p_98162_0_) {
   McoServerAddress var1 = new McoServerAddress();

   try {
      JsonRootNode var2 = (new JdomParser()).parse(p_98162_0_);
      var1.field_96417_a = var2.getStringValue(new Object[]{"address"});
   } catch (InvalidSyntaxException var3) {
      ;
   } catch (IllegalArgumentException var4) {
      ;
   }

   return var1;
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:15,代码来源:McoServerAddress.java

示例14: func_98169_a

import argo.jdom.JdomParser; //导入依赖的package包/类
public static ValueObjectSubscription func_98169_a(String p_98169_0_) {
   ValueObjectSubscription var1 = new ValueObjectSubscription();

   try {
      JsonRootNode var2 = (new JdomParser()).parse(p_98169_0_);
      var1.field_98171_a = Long.parseLong(var2.getNumberValue(new Object[]{"startDate"}));
      var1.field_98170_b = Integer.parseInt(var2.getNumberValue(new Object[]{"daysLeft"}));
   } catch (InvalidSyntaxException var3) {
      ;
   } catch (IllegalArgumentException var4) {
      ;
   }

   return var1;
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:16,代码来源:ValueObjectSubscription.java

示例15: func_110735_a

import argo.jdom.JdomParser; //导入依赖的package包/类
public static WorldTemplateList func_110735_a(String par0Str)
{
    WorldTemplateList worldtemplatelist = new WorldTemplateList();
    worldtemplatelist.field_110736_a = new ArrayList();

    try
    {
        JsonRootNode jsonrootnode = (new JdomParser()).parse(par0Str);

        if (jsonrootnode.isArrayNode(new Object[] {"templates"}))
        {
            Iterator iterator = jsonrootnode.getArrayNode(new Object[] {"templates"}).iterator();

            while (iterator.hasNext())
            {
                JsonNode jsonnode = (JsonNode)iterator.next();
                worldtemplatelist.field_110736_a.add(WorldTemplate.func_110730_a(jsonnode));
            }
        }
    }
    catch (InvalidSyntaxException invalidsyntaxexception)
    {
        ;
    }
    catch (IllegalArgumentException illegalargumentexception)
    {
        ;
    }

    return worldtemplatelist;
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:32,代码来源:WorldTemplateList.java


注:本文中的argo.jdom.JdomParser类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。