Skip to content
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.

upgrade to jackson2 #4

Merged
merged 1 commit into from
Feb 3, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions jackson/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@
*/
package ch.qos.logback.contrib.jackson;

import ch.qos.logback.contrib.json.JsonFormatter;
import org.codehaus.jackson.JsonGenerator;
import org.codehaus.jackson.map.ObjectMapper;

import java.io.IOException;
import java.io.StringWriter;
import java.util.Map;

import ch.qos.logback.contrib.json.JsonFormatter;

import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.ObjectMapper;

/**
* Jackson-specific implementation of the {@link JsonFormatter}.
*
Expand All @@ -44,7 +45,7 @@ public JacksonJsonFormatter() {
@Override
public String toJsonString(Map m) throws IOException {
StringWriter writer = new StringWriter(BUFFER_SIZE);
JsonGenerator generator = this.objectMapper.getJsonFactory().createJsonGenerator(writer);
JsonGenerator generator = this.objectMapper.getFactory().createJsonGenerator(writer);

if (isPrettyPrint()) {
generator.useDefaultPrettyPrinter();
Expand Down
12 changes: 9 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@
<timezone>-5</timezone>
</developer>
</developers>
<contributors>
<contributor>
<name>David J. M. Karlsen</name>
<email>david@davidkarlsen.com</email>
</contributor>
</contributors>

<modules>
<module>json</module>
Expand All @@ -90,7 +96,7 @@

<!-- Compile Dependencies: -->
<logback.version>1.0.9</logback.version>
<jackson.version>1.9.5</jackson.version>
<jackson.version>2.1.3</jackson.version>
<mongo-java-driver.version>2.10.1</mongo-java-driver.version>

<!-- Test Dependencies: -->
Expand Down Expand Up @@ -162,8 +168,8 @@
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
<scope>provided</scope>
</dependency>
Expand Down