本文整理汇总了Java中argo.jdom.JsonNode.getStringValue方法的典型用法代码示例。如果您正苦于以下问题:Java JsonNode.getStringValue方法的具体用法?Java JsonNode.getStringValue怎么用?Java JsonNode.getStringValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类argo.jdom.JsonNode
的用法示例。
在下文中一共展示了JsonNode.getStringValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: parseJSON
import argo.jdom.JsonNode; //导入方法依赖的package包/类
public boolean parseJSON(List<JsonNode> compilerSettings) {
for (JsonNode compilerNode : compilerSettings) {
String name = compilerNode.getStringValue("name");
String path = compilerNode.getStringValue("path");
JsonNode compilerSpecificArgs = compilerNode.getNode("compiler_specific_args");
AbstractNativeCompiler compiler = getCompiler(name);
if (compiler != null) {
compiler.setPath(new File(path));
if (!compiler.parseCompilerSpecificArgs(compilerSpecificArgs)) {
LOGGER.log(Level.WARNING, "Compiler " + name + " was unable to parse its specific arguments.");
}
} else {
throw new IllegalStateException("Unknown compiler " + name);
}
}
return true;
}
示例2: parseJSON
import argo.jdom.JsonNode; //导入方法依赖的package包/类
public static TaskGroup parseJSON(DynamicCompilerManager factory, JsonNode node) {
try {
TaskGroup output = new TaskGroup("");
String name = node.getStringValue("name");
output.name = name;
for (JsonNode task : node.getArrayNode("tasks")) {
UserDefinedAction action = UserDefinedAction.parseJSON(factory, task);
if (action != null) {
output.tasks.add(action);
}
}
output.enabled = node.getBooleanValue("enabled");
return output;
} catch (Exception e) {
Logger.getLogger(TaskGroup.class.getName()).log(Level.WARNING, "Exception parsing task group from JSON", e);
return null;
}
}
示例3: process
import argo.jdom.JsonNode; //导入方法依赖的package包/类
@Override
public boolean process(String type, long id, JsonNode content) {
if (locks.containsKey(id)) {
if (!verifyReplyContent(content)) {
getLogger().warning("Invalid reply." + content + ". Drop message!");
return false;
}
String status = content.getStringValue("status");
JsonNode message = content.getNode("message");
Reply output = locks.get(id);
output.status = status;
output.message = message;
synchronized (output) {
output.timeout = false;
output.notify();
}
return true;
}
getLogger().warning("Unknown id " + id + ". Drop message!");
return false;
}
示例4: process
import argo.jdom.JsonNode; //导入方法依赖的package包/类
@Override
public boolean process(String type, long id, JsonNode content) throws InterruptedException {
final String device = content.getStringValue("device");
String action = content.getStringValue("action");
List<Object> parsedParams = parseParams(content.getArrayNode("parameters"));
if (device.equals(DEVICE_MOUSE)) {
return mouseAction(type, id, action, parsedParams);
} else if (device.equals(DEVICE_KEYBOARD)) {
return keyboardAction(type, id, action, parsedParams);
} else if (device.equals(DEVICE_TOOL)) {
return toolAction(type, id, action, parsedParams);
}
return failure(type, id, "Unknown device " + device);
}
示例5: parseJSON
import argo.jdom.JsonNode; //导入方法依赖的package包/类
public static boolean parseJSON(List<JsonNode> ipcSettings) {
boolean result = true;
for (JsonNode language : ipcSettings) {
String name = language.getStringValue("name");
Language currentLanguage = Language.identify(name);
IIPCService service = IPCServiceManager.getIPCService(currentLanguage);
if (service != null) {
boolean newResult = service.extractSpecificConfig(language.getNode("config"));
if (!newResult) {
LOGGER.warning("Unable to parse config for ipc service " + name);
}
result &= newResult;
}
}
return result;
}
示例6: func_98163_a
import argo.jdom.JsonNode; //导入方法依赖的package包/类
public static McoServer func_98163_a(JsonNode p_98163_0_) {
McoServer var1 = new McoServer();
try {
var1.field_96408_a = Long.parseLong(p_98163_0_.getNumberValue(new Object[]{"id"}));
var1.field_96406_b = p_98163_0_.getStringValue(new Object[]{"name"});
var1.field_96407_c = p_98163_0_.getStringValue(new Object[]{"motd"});
var1.field_96404_d = p_98163_0_.getStringValue(new Object[]{"state"});
var1.field_96405_e = p_98163_0_.getStringValue(new Object[]{"owner"});
if(p_98163_0_.isArrayNode(new Object[]{"invited"})) {
var1.field_96402_f = func_98164_a(p_98163_0_.getArrayNode(new Object[]{"invited"}));
} else {
var1.field_96402_f = new ArrayList();
}
var1.field_104063_i = Integer.parseInt(p_98163_0_.getNumberValue(new Object[]{"daysLeft"}));
var1.field_96403_g = p_98163_0_.getStringValue(new Object[]{"ip"});
var1.field_98166_h = p_98163_0_.getBooleanValue(new Object[]{"expired"}).booleanValue();
var1.field_110729_i = Integer.parseInt(p_98163_0_.getNumberValue(new Object[]{"difficulty"}));
var1.field_110728_j = Integer.parseInt(p_98163_0_.getNumberValue(new Object[]{"gameMode"}));
} catch (IllegalArgumentException var3) {
;
}
return var1;
}
示例7: func_130091_a
import argo.jdom.JsonNode; //导入方法依赖的package包/类
public static PendingInvite func_130091_a(JsonNode par0JsonNode)
{
PendingInvite pendinginvite = new PendingInvite();
try
{
pendinginvite.field_130094_a = par0JsonNode.getStringValue(new Object[] {"invitationId"});
pendinginvite.field_130092_b = par0JsonNode.getStringValue(new Object[] {"worldName"});
pendinginvite.field_130093_c = par0JsonNode.getStringValue(new Object[] {"worldOwnerName"});
}
catch (Exception exception)
{
;
}
return pendinginvite;
}
示例8: func_110724_a
import argo.jdom.JsonNode; //导入方法依赖的package包/类
public static Backup func_110724_a(JsonNode par0JsonNode)
{
Backup backup = new Backup();
try
{
backup.field_110727_a = par0JsonNode.getStringValue(new Object[] {"backupId"});
backup.field_110725_b = new Date(Long.parseLong(par0JsonNode.getNumberValue(new Object[] {"lastModifiedDate"})));
backup.field_110726_c = Long.parseLong(par0JsonNode.getNumberValue(new Object[] {"size"}));
}
catch (IllegalArgumentException illegalargumentexception)
{
;
}
return backup;
}
示例9: func_110730_a
import argo.jdom.JsonNode; //导入方法依赖的package包/类
public static WorldTemplate func_110730_a(JsonNode par0JsonNode)
{
WorldTemplate worldtemplate = new WorldTemplate();
try
{
worldtemplate.field_110734_a = par0JsonNode.getNumberValue(new Object[] {"id"});
worldtemplate.field_110732_b = par0JsonNode.getStringValue(new Object[] {"name"});
worldtemplate.field_110733_c = par0JsonNode.getStringValue(new Object[] {"version"});
worldtemplate.field_110731_d = par0JsonNode.getStringValue(new Object[] {"author"});
}
catch (IllegalArgumentException illegalargumentexception)
{
;
}
return worldtemplate;
}
示例10: extractSpecificConfig
import argo.jdom.JsonNode; //导入方法依赖的package包/类
@Override
protected boolean extractSpecificConfig(JsonNode node) {
if (!super.extractSpecificConfig(node)) {
return false;
}
if (node.isNode("scalaLibraryDirectory") && !node.isNullNode("scalaLibraryDirectory")) {
scalaLibraryDirectory = new File(node.getStringValue("scalaLibraryDirectory"));
} else {
scalaLibraryDirectory = null;
}
return true;
}
示例11: process
import argo.jdom.JsonNode; //导入方法依赖的package包/类
@Override
public boolean process(String type, long id, JsonNode content) throws InterruptedException {
String action = content.getStringValue("action");
List<JsonNode> parameterNodes = content.getArrayNode("parameters");
List<String> params = new Function<JsonNode, String>(){
@Override
public String apply(JsonNode d) {
return d.getStringValue();
}}.map(parameterNodes);
if (action.equals("get")) {
if (params.size() == 2) {
return constructSuccessfulMessage(type, id, SharedVariables.getVar(params.get(0), params.get(1)));
} else {
return failure(type, id, "Invalid parameter length " + params.size());
}
} else if (action.equals("set")) {
if (params.size() == 3) {
return constructSuccessfulMessage(type, id, SharedVariables.setVar(params.get(0), params.get(1), params.get(2)));
} else {
return failure(type, id, "Invalid parameter length " + params.size());
}
} else if (action.equals("del")) {
if (params.size() == 2) {
return constructSuccessfulMessage(type, id, SharedVariables.delVar(params.get(0), params.get(1)));
} else {
return failure(type, id, "Invalid parameter length " + params.size());
}
}
return failure(type, id, "Unsupported action " + action);
}
示例12: parseJSON
import argo.jdom.JsonNode; //导入方法依赖的package包/类
public static ClientTask parseJSON(JsonNode node) {
try {
int id = Integer.parseInt(node.getNumberValue("id"));
String fileName = node.getStringValue("file_name");
return new ClientTask(id, fileName);
} catch (Exception e) {
LOGGER.log(Level.WARNING, "Failed to parse ClientTask.", e);
return null;
}
}
示例13: func_130091_a
import argo.jdom.JsonNode; //导入方法依赖的package包/类
public static PendingInvite func_130091_a(JsonNode p_130091_0_) {
PendingInvite var1 = new PendingInvite();
try {
var1.field_130094_a = p_130091_0_.getStringValue(new Object[]{"invitationId"});
var1.field_130092_b = p_130091_0_.getStringValue(new Object[]{"worldName"});
var1.field_130093_c = p_130091_0_.getStringValue(new Object[]{"worldOwnerName"});
} catch (Exception var3) {
;
}
return var1;
}
示例14: func_110724_a
import argo.jdom.JsonNode; //导入方法依赖的package包/类
public static Backup func_110724_a(JsonNode p_110724_0_) {
Backup var1 = new Backup();
try {
var1.field_110727_a = p_110724_0_.getStringValue(new Object[]{"backupId"});
var1.field_110725_b = new Date(Long.parseLong(p_110724_0_.getNumberValue(new Object[]{"lastModifiedDate"})));
var1.field_110726_c = Long.parseLong(p_110724_0_.getNumberValue(new Object[]{"size"}));
} catch (IllegalArgumentException var3) {
;
}
return var1;
}
示例15: func_110730_a
import argo.jdom.JsonNode; //导入方法依赖的package包/类
public static WorldTemplate func_110730_a(JsonNode p_110730_0_) {
WorldTemplate var1 = new WorldTemplate();
try {
var1.field_110734_a = p_110730_0_.getNumberValue(new Object[]{"id"});
var1.field_110732_b = p_110730_0_.getStringValue(new Object[]{"name"});
var1.field_110733_c = p_110730_0_.getStringValue(new Object[]{"version"});
var1.field_110731_d = p_110730_0_.getStringValue(new Object[]{"author"});
} catch (IllegalArgumentException var3) {
;
}
return var1;
}