Package io.joynr.util

Class ObjectMapper


  • public class ObjectMapper
    extends Object
    • Constructor Detail

      • ObjectMapper

        public ObjectMapper()
    • Method Detail

      • readValue

        public <T> T readValue​(com.fasterxml.jackson.core.JsonParser p,
                               Class<T> valueType)
                        throws IOException
        Throws:
        IOException
      • readValue

        public <T> T readValue​(URL src,
                               Class<T> valueType)
                        throws IOException,
                               com.fasterxml.jackson.core.JsonParseException,
                               com.fasterxml.jackson.databind.JsonMappingException
        Throws:
        IOException
        com.fasterxml.jackson.core.JsonParseException
        com.fasterxml.jackson.databind.JsonMappingException
      • readValue

        public <T> T readValue​(String content,
                               Class<T> valueType)
                        throws com.fasterxml.jackson.core.JsonProcessingException,
                               com.fasterxml.jackson.databind.JsonMappingException
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException
        com.fasterxml.jackson.databind.JsonMappingException
      • readValue

        public <T> T readValue​(String content,
                               com.fasterxml.jackson.core.type.TypeReference<T> valueTypeRef)
                        throws com.fasterxml.jackson.core.JsonProcessingException,
                               com.fasterxml.jackson.databind.JsonMappingException
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException
        com.fasterxml.jackson.databind.JsonMappingException
      • treeToValue

        public <T> T treeToValue​(com.fasterxml.jackson.core.TreeNode n,
                                 Class<T> valueType)
                          throws IllegalArgumentException,
                                 com.fasterxml.jackson.core.JsonProcessingException
        Throws:
        IllegalArgumentException
        com.fasterxml.jackson.core.JsonProcessingException
      • writeValueAsString

        public String writeValueAsString​(Object value)
                                  throws com.fasterxml.jackson.core.JsonProcessingException
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException
      • enableDefaultTypingAsProperty

        @Deprecated
        public void enableDefaultTypingAsProperty​(com.fasterxml.jackson.databind.ObjectMapper.DefaultTyping applicability,
                                                  String propertyName)
        Deprecated.
      • configure

        public void configure​(com.fasterxml.jackson.databind.SerializationFeature f,
                              boolean state)
      • configure

        public void configure​(com.fasterxml.jackson.databind.DeserializationFeature f,
                              boolean state)
      • configure

        public void configure​(com.fasterxml.jackson.databind.MapperFeature f,
                              boolean state)
      • getSerializationConfig

        public com.fasterxml.jackson.databind.SerializationConfig getSerializationConfig()
      • getDeserializationConfig

        public com.fasterxml.jackson.databind.DeserializationConfig getDeserializationConfig()
      • registerModule

        public void registerModule​(com.fasterxml.jackson.databind.Module module)
      • registerSubtypes

        public void registerSubtypes​(Class<?>... classes)
      • readValue

        public <T> T readValue​(byte[] src,
                               Class<T> valueType)
                        throws IOException,
                               com.fasterxml.jackson.core.JsonParseException,
                               com.fasterxml.jackson.databind.JsonMappingException
        Throws:
        IOException
        com.fasterxml.jackson.core.JsonParseException
        com.fasterxml.jackson.databind.JsonMappingException