Examples of SwiftJsonMarshallingException


Examples of org.apache.hadoop.fs.swift.exceptions.SwiftJsonMarshallingException

  public static <T> T toObject(String value, Class<T> klazz) throws
                                                             IOException {
    try {
      return jsonMapper.readValue(value, klazz);
    } catch (JsonGenerationException e) {
      throw new SwiftJsonMarshallingException(e.toString()
                                              + " source: " + value,
                                              e);
    } catch (JsonMappingException e) {
      throw new SwiftJsonMarshallingException(e.toString()
                                              + " source: " + value,
                                              e);
    }
  }
View Full Code Here

Examples of org.apache.hadoop.fs.swift.exceptions.SwiftJsonMarshallingException

                               final TypeReference<T> typeReference)
            throws IOException {
    try {
      return (T)jsonMapper.readValue(value, typeReference);
    } catch (JsonGenerationException e) {
      throw new SwiftJsonMarshallingException("Error generating response", e);
    } catch (JsonMappingException e) {
      throw new SwiftJsonMarshallingException("Error generating response", e);
    }
  }
View Full Code Here

Examples of org.apache.hadoop.fs.swift.exceptions.SwiftJsonMarshallingException

                               final CollectionType collectionType)
              throws IOException {
    try {
      return (T)jsonMapper.readValue(value, collectionType);
    } catch (JsonGenerationException e) {
      throw new SwiftJsonMarshallingException(e.toString()
                                              + " source: " + value,
                                              e);
    } catch (JsonMappingException e) {
      throw new SwiftJsonMarshallingException(e.toString()
                                              + " source: " + value,
                                              e);
    }
  }
View Full Code Here

Examples of org.apache.hadoop.fs.swift.exceptions.SwiftJsonMarshallingException

    Writer json = new StringWriter();
    try {
      jsonMapper.writeValue(json, object);
      return json.toString();
    } catch (JsonGenerationException e) {
      throw new SwiftJsonMarshallingException(e.toString(), e);
    } catch (JsonMappingException e) {
      throw new SwiftJsonMarshallingException(e.toString(), e);
    }
  }
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.