Package com.fasterxml.jackson.databind

Examples of com.fasterxml.jackson.databind.JsonNode.path()


      final CoinbaseTransferType type = CoinbaseTransferType.valueOf(transferNode.path("type").asText().toUpperCase());
      final String code = transferNode.path("code").asText();
      final Date createdAt = DateUtils.fromISO8601DateString(transferNode.path("created_at").asText());
      final JsonNode feesNode = transferNode.path("fees");
      final CoinbaseMoney coinbaseFee = CoinbaseCentsDeserializer.getCoinbaseMoneyFromCents(feesNode.path("coinbase"));
      final CoinbaseMoney bankFee = CoinbaseCentsDeserializer.getCoinbaseMoneyFromCents(feesNode.path("bank"));
      final Date payoutDate = DateUtils.fromISO8601DateString(transferNode.path("payout_date").asText());
      final String transactionId = transferNode.path("transaction_id").asText();
      final CoinbaseTransferStatus status = CoinbaseTransferStatus.valueOf(transferNode.path("status").asText().toUpperCase());
      final CoinbaseMoney btcAmount = CoinbaseMoneyDeserializer.getCoinbaseMoneyFromNode(transferNode.path("btc"));
      final CoinbaseMoney subtotal = CoinbaseMoneyDeserializer.getCoinbaseMoneyFromNode(transferNode.path("subtotal"));
View Full Code Here


      JsonNode node = oc.readTree(jsonParser);
      if (node.isBoolean()) {
        return new BitstampBooleanResponse(null, node.asBoolean());
      }
      else if (node.get("error") != null) {
        return new BitstampBooleanResponse(node.path("error").asText(), false);
      }
      return new BitstampBooleanResponse("Invalid response from Bitstamp Server.", false);
    }
  }
View Full Code Here

        builder.r(OBJECT_MAPPER.treeToValue(props.path(Constants.FL_SCHEMA_R), Quorum.class));
        builder.w(OBJECT_MAPPER.treeToValue(props.path(Constants.FL_SCHEMA_W), Quorum.class));
        builder.dw(OBJECT_MAPPER.treeToValue(props.path(Constants.FL_SCHEMA_DW), Quorum.class));
        builder.rw(OBJECT_MAPPER.treeToValue(props.path(Constants.FL_SCHEMA_RW), Quorum.class));
        // TODO backwards compatibility - remove when riak goes 1.3
        if(!props.path(Constants.FL_SCHEMA_PR).isMissingNode()) {
            builder.pr(OBJECT_MAPPER.treeToValue(props.path(Constants.FL_SCHEMA_PR), Quorum.class));
        }
        if(!props.path(Constants.FL_SCHEMA_PW).isMissingNode()) {
            builder.pw(OBJECT_MAPPER.treeToValue(props.path(Constants.FL_SCHEMA_PW), Quorum.class));
        }
View Full Code Here

        builder.w(OBJECT_MAPPER.treeToValue(props.path(Constants.FL_SCHEMA_W), Quorum.class));
        builder.dw(OBJECT_MAPPER.treeToValue(props.path(Constants.FL_SCHEMA_DW), Quorum.class));
        builder.rw(OBJECT_MAPPER.treeToValue(props.path(Constants.FL_SCHEMA_RW), Quorum.class));
        // TODO backwards compatibility - remove when riak goes 1.3
        if(!props.path(Constants.FL_SCHEMA_PR).isMissingNode()) {
            builder.pr(OBJECT_MAPPER.treeToValue(props.path(Constants.FL_SCHEMA_PR), Quorum.class));
        }
        if(!props.path(Constants.FL_SCHEMA_PW).isMissingNode()) {
            builder.pw(OBJECT_MAPPER.treeToValue(props.path(Constants.FL_SCHEMA_PW), Quorum.class));
        }
        if(!props.path(Constants.FL_SCHEMA_BASIC_QUORUM).isMissingNode()) {
View Full Code Here

        builder.rw(OBJECT_MAPPER.treeToValue(props.path(Constants.FL_SCHEMA_RW), Quorum.class));
        // TODO backwards compatibility - remove when riak goes 1.3
        if(!props.path(Constants.FL_SCHEMA_PR).isMissingNode()) {
            builder.pr(OBJECT_MAPPER.treeToValue(props.path(Constants.FL_SCHEMA_PR), Quorum.class));
        }
        if(!props.path(Constants.FL_SCHEMA_PW).isMissingNode()) {
            builder.pw(OBJECT_MAPPER.treeToValue(props.path(Constants.FL_SCHEMA_PW), Quorum.class));
        }
        if(!props.path(Constants.FL_SCHEMA_BASIC_QUORUM).isMissingNode()) {
            builder.basicQuorum(props.path(Constants.FL_SCHEMA_BASIC_QUORUM).asBoolean());
        }
View Full Code Here

        // TODO backwards compatibility - remove when riak goes 1.3
        if(!props.path(Constants.FL_SCHEMA_PR).isMissingNode()) {
            builder.pr(OBJECT_MAPPER.treeToValue(props.path(Constants.FL_SCHEMA_PR), Quorum.class));
        }
        if(!props.path(Constants.FL_SCHEMA_PW).isMissingNode()) {
            builder.pw(OBJECT_MAPPER.treeToValue(props.path(Constants.FL_SCHEMA_PW), Quorum.class));
        }
        if(!props.path(Constants.FL_SCHEMA_BASIC_QUORUM).isMissingNode()) {
            builder.basicQuorum(props.path(Constants.FL_SCHEMA_BASIC_QUORUM).asBoolean());
        }
        if(!props.path(Constants.FL_SCHEMA_NOT_FOUND_OK).isMissingNode()) {
View Full Code Here

            builder.pr(OBJECT_MAPPER.treeToValue(props.path(Constants.FL_SCHEMA_PR), Quorum.class));
        }
        if(!props.path(Constants.FL_SCHEMA_PW).isMissingNode()) {
            builder.pw(OBJECT_MAPPER.treeToValue(props.path(Constants.FL_SCHEMA_PW), Quorum.class));
        }
        if(!props.path(Constants.FL_SCHEMA_BASIC_QUORUM).isMissingNode()) {
            builder.basicQuorum(props.path(Constants.FL_SCHEMA_BASIC_QUORUM).asBoolean());
        }
        if(!props.path(Constants.FL_SCHEMA_NOT_FOUND_OK).isMissingNode()) {
            builder.notFoundOK(props.path(Constants.FL_SCHEMA_NOT_FOUND_OK).asBoolean());
        }
View Full Code Here

        }
        if(!props.path(Constants.FL_SCHEMA_PW).isMissingNode()) {
            builder.pw(OBJECT_MAPPER.treeToValue(props.path(Constants.FL_SCHEMA_PW), Quorum.class));
        }
        if(!props.path(Constants.FL_SCHEMA_BASIC_QUORUM).isMissingNode()) {
            builder.basicQuorum(props.path(Constants.FL_SCHEMA_BASIC_QUORUM).asBoolean());
        }
        if(!props.path(Constants.FL_SCHEMA_NOT_FOUND_OK).isMissingNode()) {
            builder.notFoundOK(props.path(Constants.FL_SCHEMA_NOT_FOUND_OK).asBoolean());
        }
View Full Code Here

            builder.pw(OBJECT_MAPPER.treeToValue(props.path(Constants.FL_SCHEMA_PW), Quorum.class));
        }
        if(!props.path(Constants.FL_SCHEMA_BASIC_QUORUM).isMissingNode()) {
            builder.basicQuorum(props.path(Constants.FL_SCHEMA_BASIC_QUORUM).asBoolean());
        }
        if(!props.path(Constants.FL_SCHEMA_NOT_FOUND_OK).isMissingNode()) {
            builder.notFoundOK(props.path(Constants.FL_SCHEMA_NOT_FOUND_OK).asBoolean());
        }

        builder.chashKeyFunction(OBJECT_MAPPER.treeToValue(props.path(Constants.FL_SCHEMA_CHASHFUN),
                                                           NamedErlangFunction.class));
View Full Code Here

        }
        if(!props.path(Constants.FL_SCHEMA_BASIC_QUORUM).isMissingNode()) {
            builder.basicQuorum(props.path(Constants.FL_SCHEMA_BASIC_QUORUM).asBoolean());
        }
        if(!props.path(Constants.FL_SCHEMA_NOT_FOUND_OK).isMissingNode()) {
            builder.notFoundOK(props.path(Constants.FL_SCHEMA_NOT_FOUND_OK).asBoolean());
        }

        builder.chashKeyFunction(OBJECT_MAPPER.treeToValue(props.path(Constants.FL_SCHEMA_CHASHFUN),
                                                           NamedErlangFunction.class));
        builder.linkWalkFunction(OBJECT_MAPPER.treeToValue(props.path(Constants.FL_SCHEMA_LINKFUN),
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.