Package com.fasterxml.jackson.databind

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


    private CoinbaseAddress getAddressFromNode(final JsonNode addressNode) throws InvalidFormatException {

      final JsonNode nestedAddressNode = addressNode.path("address");
      final String address = nestedAddressNode.path("address").asText();
      final String callbackUrl = nestedAddressNode.path("callback_url").asText();
      final String label = nestedAddressNode.path("label").asText();
      final Date createdAt = DateUtils.fromISO8601DateString(nestedAddressNode.path("created_at").asText());

      return new CoinbaseAddress(address, callbackUrl, label, createdAt);
    }
  }
View Full Code Here


      final JsonNode nestedAddressNode = addressNode.path("address");
      final String address = nestedAddressNode.path("address").asText();
      final String callbackUrl = nestedAddressNode.path("callback_url").asText();
      final String label = nestedAddressNode.path("label").asText();
      final Date createdAt = DateUtils.fromISO8601DateString(nestedAddressNode.path("created_at").asText());

      return new CoinbaseAddress(address, callbackUrl, label, createdAt);
    }
  }
}
View Full Code Here

    public CoinbaseCurrency deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException {

      ObjectCodec oc = jp.getCodec();
      JsonNode node = oc.readTree(jp);
      if (node.isArray()) {
        String name = node.path(0).asText();
        String isoCode = node.path(1).asText();
        return new CoinbaseCurrency(name, isoCode);
      }
      return null;
    }
View Full Code Here

      ObjectCodec oc = jp.getCodec();
      JsonNode node = oc.readTree(jp);
      if (node.isArray()) {
        String name = node.path(0).asText();
        String isoCode = node.path(1).asText();
        return new CoinbaseCurrency(name, isoCode);
      }
      return null;
    }
  }
View Full Code Here

          for (final JsonNode errorNode : errorsNode)
            errors.add(errorNode.asText());
      }

      final JsonNode transferNode = node.path("transfer");
      final String id = transferNode.path("id").asText();
      final String fundingType = transferNode.path("_type").asText();
      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");
View Full Code Here

            errors.add(errorNode.asText());
      }

      final JsonNode transferNode = node.path("transfer");
      final String id = transferNode.path("id").asText();
      final String fundingType = transferNode.path("_type").asText();
      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"));
View Full Code Here

      }

      final JsonNode transferNode = node.path("transfer");
      final String id = transferNode.path("id").asText();
      final String fundingType = transferNode.path("_type").asText();
      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"));
View Full Code Here

      final JsonNode transferNode = node.path("transfer");
      final String id = transferNode.path("id").asText();
      final String fundingType = transferNode.path("_type").asText();
      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());
View Full Code Here

      final JsonNode transferNode = node.path("transfer");
      final String id = transferNode.path("id").asText();
      final String fundingType = transferNode.path("_type").asText();
      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();
View Full Code Here

      final String fundingType = transferNode.path("_type").asText();
      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"));
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.