Package com.fasterxml.jackson.databind.type

Examples of com.fasterxml.jackson.databind.type.CollectionLikeType


    // Read in the JSON from the example resources
    InputStream is = CryptonitAdapterTest.class.getResourceAsStream("/marketdata/example-trading-pairs.json");

    // Use Jackson to parse it
    ObjectMapper mapper = new ObjectMapper();
    CollectionLikeType nestedListType = mapper.getTypeFactory().constructCollectionType(List.class, mapper.getTypeFactory().constructCollectionType(List.class, String.class));
    List<List<String>> tradingPairs = mapper.readValue(is, nestedListType);

    Collection<CurrencyPair> currencyPairs = CryptonitAdapters.adaptCurrencyPairs(tradingPairs);

    assertThat(currencyPairs).hasSize(3);
View Full Code Here


        UriStringDeserializer uriStringDeserializer = new UriStringDeserializer(persistentProperty, converter);

        if (persistentProperty.isCollectionLike()) {

          CollectionLikeType collectionType = config.getTypeFactory().constructCollectionLikeType(
              persistentProperty.getType(), persistentProperty.getActualType());
          CollectionValueInstantiator instantiator = new CollectionValueInstantiator(persistentProperty);
          CollectionDeserializer collectionDeserializer = new CollectionDeserializer(collectionType,
              uriStringDeserializer, null, instantiator);
View Full Code Here

TOP

Related Classes of com.fasterxml.jackson.databind.type.CollectionLikeType

Copyright © 2018 www.massapicom. 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.