@Override public <T> T loadConfig(Class<T> taskType) { return model.readObjectWithConfigSerDe(taskType, data.traverse()); }
@Override public <T> T loadTask(Class<T> taskType) { return model.readObject(taskType, data.traverse()); }
return null; JsonParser newParser = node.traverse(); SpiJsonReader newReader = jsonRead.forJson(newParser, false);
/** * Retrieves the payload. * * @param type * Specify one of the {@link GHEventPayload} subtype that defines a type-safe access to the payload. * This must match the {@linkplain #getType() event type}. */ public <T extends GHEventPayload> T getPayload(Class<T> type) throws IOException { T v = GitHub.MAPPER.readValue(payload.traverse(), type); v.wrapUp(root); return v; } }
/** * Retrieves the payload. * * @param type * Specify one of the {@link GHEventPayload} subtype that defines a type-safe access to the payload. * This must match the {@linkplain #getType() event type}. */ public <T extends GHEventPayload> T getPayload(Class<T> type) throws IOException { T v = GitHub.MAPPER.readValue(payload.traverse(), type); v.wrapUp(root); return v; } }
/** * Retrieves the payload. * * @param type * Specify one of the {@link GHEventPayload} subtype that defines a type-safe access to the payload. * This must match the {@linkplain #getType() event type}. */ public <T extends GHEventPayload> T getPayload(Class<T> type) throws IOException { T v = GitHub.MAPPER.readValue(payload.traverse(), type); v.wrapUp(root); return v; } }
values.add(null); } else if (node.isObject()) { values.add(((ObjectNode) node).traverse(jp.getCodec()).readValueAs(GuardedString.class)); } else if (node.isBoolean()) { values.add(node.asBoolean());
values.add(null); } else if (node.isObject()) { values.add(((ObjectNode) node).traverse(jp.getCodec()).readValueAs(GuardedString.class)); } else if (node.isBoolean()) { values.add(node.asBoolean());
private TableSchema tableSchema(Config params) { try { return params.get("schema", TableSchema.class); } catch (ConfigException ignore) { } String fileName = params.get("schema", String.class); try { String schemaString = workspace.templateFile(templateEngine, fileName, UTF_8, params); if (FilenameUtils.getExtension(fileName).equals("json")) { return objectMapper.readValue(schemaString, TableSchema.class); } else { ObjectNode schemaJson = new YamlLoader().loadString(schemaString); return objectMapper.readValue(schemaJson.traverse(), TableSchema.class); } } catch (IOException ex) { throw workspace.propagateIoException(ex, fileName, ConfigException::new); } catch (TemplateException ex) { throw new ConfigException( String.format(ENGLISH, "%s in %s", ex.getMessage(), fileName), ex); } } }
entityDeserializer.doDeserialize(item.traverse(parser.getCodec())).getPayload()); } else if (itemContextURL.isDeltaDeletedEntity()) { delta.getDeletedEntities().add(parser.getCodec().treeToValue(item, DeletedEntity.class));
entityDeserializer.doDeserialize(item.traverse(parser.getCodec())).getPayload()); } else if (itemContextURL.isDeltaDeletedEntity()) { delta.getDeletedEntities().add(parser.getCodec().treeToValue(item, DeletedEntity.class));
return null; JsonParser newParser = node.traverse(); SpiJsonReader newReader = jsonRead.forJson(newParser, false);