BAEL-2721 Moved JsonAliasUnitTest into new module called jackson-2. (#6555)

* BAEL-2721 Examples of @JsonAlias and Gson's alternate parameter

* BAEL-2721 Update class and method names for JsonAlias and GsonAlternate

* BAEL-2721 move JsonAliasUnitTest into new jackson-2 module

* BAEL-2721 Removed unused dependencies from pom.xml

* BAEL-2721 Tidy up logback.xml

* BAEL-2721 fix url in README.md
This commit is contained in:
pcoates33 2019-03-18 06:56:13 +00:00 committed by maibin
parent 10e9cbda1e
commit 16fdea7267
8 changed files with 91 additions and 0 deletions

View File

@ -11,3 +11,5 @@
- [Convert JSON to a Map Using Gson](https://www.baeldung.com/gson-json-to-map)
- [Working with Primitive Values in Gson](https://www.baeldung.com/java-gson-primitives)
- [Convert String to JsonObject with Gson](https://www.baeldung.com/gson-string-to-jsonobject)
- [Mapping Multiple JSON Fields to One Java Field](https://www.baeldung.com/json-multiple-fields-single-java-field)

13
jackson-2/.gitignore vendored Normal file
View File

@ -0,0 +1,13 @@
*.class
#folders#
/target
/neoDb*
/data
/src/main/webapp/WEB-INF/classes
*/META-INF/*
# Packaged files #
*.jar
*.war
*.ear

9
jackson-2/README.md Normal file
View File

@ -0,0 +1,9 @@
=========
## Jackson Cookbooks and Examples
###The Course
The "REST With Spring" Classes: http://bit.ly/restwithspring
### Relevant Articles:
- [Mapping Multiple JSON Fields to One Java Field](https://www.baeldung.com/json-multiple-fields-single-java-field)

52
jackson-2/pom.xml Normal file
View File

@ -0,0 +1,52 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>jackson-2</artifactId>
<version>0.1-SNAPSHOT</version>
<name>jackson-2</name>
<parent>
<groupId>com.baeldung</groupId>
<artifactId>parent-java</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-java</relativePath>
</parent>
<dependencies>
<!-- marshalling -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>
<!-- test scoped -->
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>${assertj.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<finalName>jackson-2</finalName>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
<properties>
<!-- testing -->
<assertj.version>3.11.0</assertj.version>
</properties>
</project>

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
</pattern>
</encoder>
</appender>
<root level="INFO">
<appender-ref ref="STDOUT" />
</root>
</configuration>

View File

@ -436,6 +436,7 @@
<module>immutables</module>
<module>jackson</module>
<module>jackson-2</module>
<module>java-collections-conversions</module>
<module>java-collections-maps</module>
<!-- <module>java-dates</module> --> <!-- We haven't upgraded to java 9. Fixing in BAEL-10841 -->
@ -1078,6 +1079,7 @@
<module>immutables</module>
<module>jackson</module>
<module>jackson-2</module>
<module>java-collections-conversions</module>
<module>java-collections-maps</module>
<!-- <module>java-dates</module> --> <!-- We haven't upgraded to java 9. Fixing in BAEL-10841 -->