Skip to content
This repository has been archived by the owner on Nov 5, 2019. It is now read-only.

Commit

Permalink
Fix #38 (requires jackson-databind 2.3.1)
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Dec 11, 2013
1 parent 2305af8 commit e807494
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ used to enhance access functionality using bytecode generation.
<properties>
<!-- annotations more stable, no patch versions -->
<jackson.annotation.version>2.3.0</jackson.annotation.version>
<jackson.core.version>2.3.0</jackson.core.version>
<jackson.core.version>2.3.1-SNAPSHOT</jackson.core.version>

<!-- Generate PackageVersion.java into this directory. -->
<packageVersion.dir>com/fasterxml/jackson/module/afterburner</packageVersion.dir>
Expand Down
3 changes: 3 additions & 0 deletions release-notes/VERSION
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Project: jackson-module-afterburner
Version: 2.3.1 (xx-Dec-2013)

#38: Handling of @JsonRawValue broken (require 2.3.1 of jackson-databind for fix)
(reported by willcheck@github)

------------------------------------------------------------------------
=== History: ===
------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,8 @@ protected PropertyAccessorCollector findProperties(Class<?> beanClass,
continue;
}
}
/* [Issue#9]: also skip unwrapping stuff...
*
* TODO: 24-Jul-2013, tatu: should use "BeanPropertyWriter.isUnwrapping()" when
* Jackson 2.3 is out (and adds it)
*/
if (bpw instanceof UnwrappingBeanPropertyWriter) {
// [Issue#9]: also skip unwrapping stuff...
if (bpw.isUnwrapping()) {
continue;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ static class FilteredProps
@JsonFilter("b")
public Bean second = new Bean();
}

/*
/**********************************************************
/* Unit tests
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package com.fasterxml.jackson.module.afterburner.ser;

import com.fasterxml.jackson.annotation.JsonRawValue;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.module.afterburner.AfterburnerTestBase;

public class TestRawValues extends AfterburnerTestBase
{
static class SerializableObject
{
public SerializableObject(String v) { value = v; }

@JsonRawValue
public String value;
}

/*
/**********************************************************
/* Unit tests
/**********************************************************
*/

private final ObjectMapper MAPPER = mapperWithModule();

public void testAfterBurner() throws Exception
{
SerializableObject so = new SerializableObject("[123]");

assertEquals("{\"value\":[123]}", MAPPER.writeValueAsString(so));
}
}

0 comments on commit e807494

Please sign in to comment.