Package org.codehaus.jackson.map.type

Examples of org.codehaus.jackson.map.type.CollectionType


    }

    @Override
    @SuppressWarnings({"unchecked"})
    public <T extends Collection<E>, E> T convertValue(Object fromValue, Class<T> collectionType, Class<E> elementType) throws IllegalArgumentException {
        CollectionType colType = objectMapper.getTypeFactory().constructCollectionType(collectionType, elementType);

        return (T)objectMapper.convertValue(fromValue, colType);
    }
View Full Code Here


        //a different status code: rethrow immediately
        throw e;
      }
    }

    final CollectionType collectionType = JSONUtil.getJsonMapper().getTypeFactory().
            constructCollectionType(List.class, SwiftObjectFileStatus.class);

    final List<SwiftObjectFileStatus> fileStatusList =
            JSONUtil.toObject(new String(bytes), collectionType);
View Full Code Here

        //a different status code: rethrow immediately
        throw e;
      }
    }

    final CollectionType collectionType = JSONUtil.getJsonMapper().getTypeFactory().
            constructCollectionType(List.class, SwiftObjectFileStatus.class);

    final List<SwiftObjectFileStatus> fileStatusList =
            JSONUtil.toObject(new String(bytes), collectionType);
View Full Code Here

    public ArrayList<Committee> getCommitteesFromJson(String filePath, ObjectMapper mapper) {
        return getCommitteesFromJson(new File(filePath), mapper);
    }

    public ArrayList<Committee> getCommitteesFromJson(File file, ObjectMapper mapper) {
        CollectionType type = CollectionType.construct(ArrayList.class, SimpleType.construct(Committee.class));

        ArrayList<Committee> committees = null;

        try {
            committees = mapper.readValue(
View Full Code Here

TOP

Related Classes of org.codehaus.jackson.map.type.CollectionType

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.