Package com.fasterxml.jackson.core

Examples of com.fasterxml.jackson.core.Version


   * @param converter must not be {@literal null}.
   */
  public PersistentEntityJackson2Module(ResourceMappings mappings, PersistentEntities entities,
      RepositoryRestConfiguration config, UriToEntityConverter converter) {

    super(new Version(2, 0, 0, null, "org.springframework.data.rest", "jackson-module"));

    Assert.notNull(mappings, "ResourceMappings must not be null!");
    Assert.notNull(entities, "Repositories must not be null!");
    Assert.notNull(config, "RepositoryRestConfiguration must not be null!");
    Assert.notNull(converter, "UriToEntityConverter must not be null!");
View Full Code Here


  private static final long serialVersionUID = 7806951456457932384L;

  public Jackson2HalModule() {

    super("json-hal-module", new Version(1, 0, 0, null, "org.springframework.hateoas", "spring-hateoas"));

    setMixInAnnotation(Link.class, LinkMixin.class);
    setMixInAnnotation(ResourceSupport.class, ResourceSupportMixin.class);
    setMixInAnnotation(Resources.class, ResourcesMixin.class);
  }
View Full Code Here

     */
    private static final long serialVersionUID = -8391094596994578732L;

    public AbiquoModule()
    {
        super("Abiquo", new Version(0, 0, 1, "", "com.abiquo", "m"));
        addSerializer(EventDetails.class, new EventDetailsSerializer());
        addDeserializer(EventDetails.class, new EventDetailsDeserializer());
    }
View Full Code Here

  public static final String EXP = "E";
  public static final String AT = "@";

  public static Module build() {

    final Version version = new Version(1, 0, 0, null, null, null);

    final SimpleModule module = new SimpleModule("values", version);

    //
View Full Code Here

    private static ObjectMapper om = createObjectMapper();

    private static ObjectMapper createObjectMapper() {
        om = new ObjectMapper();
        final SimpleModule module = new SimpleModule("MyModule", new Version(0, 10, 0, null,
                "org.jboss.aerogear", "aerogear-simplepush-server"));
        module.addDeserializer(MessageType.class, new MessageTypeDeserializer());

        module.addDeserializer(RegisterMessageImpl.class, new RegisterDeserializer());
        module.addSerializer(RegisterMessageImpl.class, new RegisterSerializer());
View Full Code Here

        context.addBeanSerializerModifier(modifier);
    }

    @Override
    public Version version() {
        return new Version(1, 0, 0, null, "org.candlepin", "");
    }
View Full Code Here

    /**********************************************************
     */
   
    protected VersionUtil()
    {
        Version v = null;
        try {
            /* Class we pass only matters for resource-loading: can't use this Class
             * (as it's just being loaded at this point), nor anything that depends on it.
             */
            v = VersionUtil.versionFor(getClass());
View Full Code Here

     * If no version information is found, {@link Version#unknownVersion()} is returned.
     */
    @SuppressWarnings("resource")
    public static Version versionFor(Class<?> cls)
    {
        Version packageVersion = packageVersionFor(cls);
        if (packageVersion != null) {
            return packageVersion;
        }
        final InputStream in = cls.getResourceAsStream("VERSION.txt");
        if (in == null) {
View Full Code Here

    public static Version parseVersion(String versionStr, String groupId, String artifactId)
    {
        if (versionStr != null && (versionStr = versionStr.trim()).length() > 0) {
            String[] parts = VERSION_SEPARATOR.split(versionStr);
            return new Version(parseVersionPart(parts[0]),
                    (parts.length > 1) ? parseVersionPart(parts[1]) : 0,
                    (parts.length > 2) ? parseVersionPart(parts[2]) : 0,
                    (parts.length > 3) ? parts[3] : null,
                    groupId, artifactId);
        }
View Full Code Here

            new TypeReference<List<Object>>() {};

    public static void configureStockJoltObjectMapper( ObjectMapper objectMapper ) {

        // All Json maps should be deserialized into LinkedHashMaps.
        SimpleModule stockModule = new SimpleModule("stockJoltMapping", new Version(1, 0, 0, null, null, null))
                .addAbstractTypeMapping( Map.class, LinkedHashMap.class );

        objectMapper.registerModule(stockModule);

        // allow the mapper to parse JSON with comments in it
View Full Code Here

TOP

Related Classes of com.fasterxml.jackson.core.Version

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.