Merge pull request #5168 from dkapil/task/BAEL-8853
BAEL-8853 Merge jsonb module into another module
This commit is contained in:
commit
9d0c10d5f9
@ -9,3 +9,4 @@
|
|||||||
- [Introduction to JsonPath](http://www.baeldung.com/guide-to-jayway-jsonpath)
|
- [Introduction to JsonPath](http://www.baeldung.com/guide-to-jayway-jsonpath)
|
||||||
- [Introduction to JSON-Java (org.json)](http://www.baeldung.com/java-org-json)
|
- [Introduction to JSON-Java (org.json)](http://www.baeldung.com/java-org-json)
|
||||||
- [Overview of JSON Pointer](https://www.baeldung.com/json-pointer)
|
- [Overview of JSON Pointer](https://www.baeldung.com/json-pointer)
|
||||||
|
- [Introduction to the JSON Binding API (JSR 367) in Java](http://www.baeldung.com/java-json-binding-api)
|
22
json/pom.xml
22
json/pom.xml
@ -33,7 +33,11 @@
|
|||||||
<artifactId>json</artifactId>
|
<artifactId>json</artifactId>
|
||||||
<version>20171018</version>
|
<version>20171018</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.json.bind</groupId>
|
||||||
|
<artifactId>javax.json.bind-api</artifactId>
|
||||||
|
<version>${jsonb-api.version}</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>junit</groupId>
|
||||||
<artifactId>junit</artifactId>
|
<artifactId>junit</artifactId>
|
||||||
@ -46,12 +50,26 @@
|
|||||||
<artifactId>javax.json</artifactId>
|
<artifactId>javax.json</artifactId>
|
||||||
<version>1.1.2</version>
|
<version>1.1.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse</groupId>
|
||||||
|
<artifactId>yasson</artifactId>
|
||||||
|
<version>${yasson.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- utils -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.commons</groupId>
|
||||||
|
<artifactId>commons-collections4</artifactId>
|
||||||
|
<version>${commons-collections4.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<everit.json.schema.version>1.4.1</everit.json.schema.version>
|
<everit.json.schema.version>1.4.1</everit.json.schema.version>
|
||||||
<fastjson.version>1.2.21</fastjson.version>
|
<fastjson.version>1.2.21</fastjson.version>
|
||||||
|
<jsonb-api.version>1.0</jsonb-api.version>
|
||||||
|
<commons-collections4.version>4.1</commons-collections4.version>
|
||||||
|
<yasson.version>1.0.1</yasson.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
@ -18,8 +18,9 @@ import org.apache.commons.collections4.ListUtils;
|
|||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import com.baeldung.adapter.PersonAdapter;
|
import com.baeldung.adapter.PersonAdapter;
|
||||||
|
import com.baeldung.jsonb.Person;
|
||||||
|
|
||||||
public class JsonbTest {
|
public class JsonbUnitTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void givenPersonList_whenSerializeWithJsonb_thenGetPersonJsonArray() {
|
public void givenPersonList_whenSerializeWithJsonb_thenGetPersonJsonArray() {
|
12
jsonb/.gitignore
vendored
12
jsonb/.gitignore
vendored
@ -1,12 +0,0 @@
|
|||||||
#folders#
|
|
||||||
.idea
|
|
||||||
/target
|
|
||||||
/neoDb*
|
|
||||||
/data
|
|
||||||
/src/main/webapp/WEB-INF/classes
|
|
||||||
*/META-INF/*
|
|
||||||
|
|
||||||
# Packaged files #
|
|
||||||
*.jar
|
|
||||||
*.war
|
|
||||||
*.ear
|
|
@ -1,4 +0,0 @@
|
|||||||
## JSON B
|
|
||||||
|
|
||||||
## Relevant articles:
|
|
||||||
- [Introduction to the JSON Binding API (JSR 367) in Java](http://www.baeldung.com/java-json-binding-api)
|
|
101
jsonb/pom.xml
101
jsonb/pom.xml
@ -1,101 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<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>
|
|
||||||
<groupId>com.baeldung</groupId>
|
|
||||||
<artifactId>json-b</artifactId>
|
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
|
||||||
<packaging>jar</packaging>
|
|
||||||
<name>json-b</name>
|
|
||||||
<description>json-b sample project</description>
|
|
||||||
|
|
||||||
<parent>
|
|
||||||
<groupId>com.baeldung</groupId>
|
|
||||||
<artifactId>parent-modules</artifactId>
|
|
||||||
<version>1.0.0-SNAPSHOT</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>javax.json.bind</groupId>
|
|
||||||
<artifactId>javax.json.bind-api</artifactId>
|
|
||||||
<version>${jsonb-api.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<!-- utils -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.commons</groupId>
|
|
||||||
<artifactId>commons-collections4</artifactId>
|
|
||||||
<version>${commons-collections4.version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.junit.jupiter</groupId>
|
|
||||||
<artifactId>junit-jupiter-api</artifactId>
|
|
||||||
<version>${junit.jupiter.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.junit.platform</groupId>
|
|
||||||
<artifactId>junit-platform-surefire-provider</artifactId>
|
|
||||||
<version>${junit.platform.version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.junit.platform</groupId>
|
|
||||||
<artifactId>junit-platform-runner</artifactId>
|
|
||||||
<version>${junit.platform.version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
<profiles>
|
|
||||||
<profile>
|
|
||||||
<id>yasson</id>
|
|
||||||
<activation>
|
|
||||||
<activeByDefault>true</activeByDefault>
|
|
||||||
</activation>
|
|
||||||
<dependencies>
|
|
||||||
<!-- Dependencies for Yasson -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.eclipse</groupId>
|
|
||||||
<artifactId>yasson</artifactId>
|
|
||||||
<version>${yasson.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.glassfish</groupId>
|
|
||||||
<artifactId>javax.json</artifactId>
|
|
||||||
<version>${javax.json.version}</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>johnzon</id>
|
|
||||||
<dependencies>
|
|
||||||
<!-- Dependencies for Johnzon -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
|
||||||
<artifactId>geronimo-json_1.1_spec</artifactId>
|
|
||||||
<version>${geronimo-json_1.1_spec.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.johnzon</groupId>
|
|
||||||
<artifactId>johnzon-jsonb</artifactId>
|
|
||||||
<version>${johnzon.version}</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</profile>
|
|
||||||
</profiles>
|
|
||||||
|
|
||||||
<properties>
|
|
||||||
<maven.compiler.source>1.8</maven.compiler.source>
|
|
||||||
<maven.compiler.target>1.8</maven.compiler.target>
|
|
||||||
<junit.platform.version>1.0.0</junit.platform.version>
|
|
||||||
<jsonb-api.version>1.0</jsonb-api.version>
|
|
||||||
<johnzon.version>1.1.3</johnzon.version>
|
|
||||||
<geronimo-json_1.1_spec.version>1.0</geronimo-json_1.1_spec.version>
|
|
||||||
<yasson.version>1.0.1</yasson.version>
|
|
||||||
<javax.json.version>1.1.2</javax.json.version>
|
|
||||||
<commons-collections4.version>4.1</commons-collections4.version>
|
|
||||||
</properties>
|
|
||||||
|
|
||||||
</project>
|
|
@ -1,13 +0,0 @@
|
|||||||
<?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>
|
|
Loading…
x
Reference in New Issue
Block a user