Compare commits
No commits in common. "5ba9e6af3c84e3d98197986f67e0007b42844118" and "26683c0d7502027a30b5e5ea6130736098abcac2" have entirely different histories.
5ba9e6af3c
...
26683c0d75
|
@ -34,7 +34,6 @@
|
||||||
<module name="core-java-io" />
|
<module name="core-java-io" />
|
||||||
<module name="discourse" />
|
<module name="discourse" />
|
||||||
<module name="image-processing" />
|
<module name="image-processing" />
|
||||||
<module name="jackson-jr" />
|
|
||||||
<module name="spring-data-redis" />
|
<module name="spring-data-redis" />
|
||||||
<module name="core-java" />
|
<module name="core-java" />
|
||||||
<module name="jackson-custom-conversions" />
|
<module name="jackson-custom-conversions" />
|
||||||
|
|
|
@ -51,11 +51,6 @@
|
||||||
<option name="name" value="iSharkFly Private Snapshots" />
|
<option name="name" value="iSharkFly Private Snapshots" />
|
||||||
<option name="url" value="https://repo.isharkfly.com/repository/maven-snapshots/" />
|
<option name="url" value="https://repo.isharkfly.com/repository/maven-snapshots/" />
|
||||||
</remote-repository>
|
</remote-repository>
|
||||||
<remote-repository>
|
|
||||||
<option name="id" value="" />
|
|
||||||
<option name="name" value="" />
|
|
||||||
<option name="url" value="https://repo.maven.apache.org/maven2/" />
|
|
||||||
</remote-repository>
|
|
||||||
<remote-repository>
|
<remote-repository>
|
||||||
<option name="id" value="ossez-repo-snapshots" />
|
<option name="id" value="ossez-repo-snapshots" />
|
||||||
<option name="name" value="OSSEZ Private Snapshots" />
|
<option name="name" value="OSSEZ Private Snapshots" />
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
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>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>jackson-jr</artifactId>
|
<artifactId>jackson-jr</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
<name>jackson-jr</name>
|
<name>jackson-jr</name>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
|
@ -43,7 +44,7 @@
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<jackson.version>2.17.0</jackson.version>
|
<jackson.version>2.16.0</jackson.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
</project>
|
</project>
|
|
@ -1,4 +1,4 @@
|
||||||
package com.ossez.jacksonjr;
|
package com.baeldung.jacksonjr;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.ossez.jacksonjr;
|
package com.baeldung.jacksonjr;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.ossez.jacksonjr;
|
package com.baeldung.jacksonjr;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.ossez.jacksonjr;
|
package com.baeldung.jacksonjr;
|
||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package com.ossez.jacksonjr;
|
package com.baeldung.jacksonjr;
|
||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package com.ossez.jacksonjr;
|
package com.baeldung.jacksonjr;
|
||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||||
|
@ -13,7 +13,7 @@ public class JacksonJrFeaturesUnitTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void whenSerializingObject_thenReturnJson() throws IOException {
|
public void whenSerializingObject_thenReturnJson() throws IOException {
|
||||||
String json = com.ossez.jacksonjr.JacksonJrFeatures.jsonObject();
|
String json = JacksonJrFeatures.jsonObject();
|
||||||
assertTrue(json.contains("name"));
|
assertTrue(json.contains("name"));
|
||||||
assertTrue(json.contains("age"));
|
assertTrue(json.contains("age"));
|
||||||
}
|
}
|
|
@ -1,25 +0,0 @@
|
||||||
package com.ossez.jacksonjr;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.jr.ob.JSON;
|
|
||||||
import org.junit.jupiter.api.Test;
|
|
||||||
import org.junit.jupiter.api.TestInstance;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.LinkedHashMap;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create JSON String
|
|
||||||
*/
|
|
||||||
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
|
|
||||||
public class CreateJSONTest {
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void createJsonStringTest() throws IOException {
|
|
||||||
System.out.println(JSON.std.with(JSON.Feature.PRETTY_PRINT_OUTPUT)
|
|
||||||
.asString(new LinkedHashMap<String, Object>() {{
|
|
||||||
put("name", "John Doe");
|
|
||||||
put("age", 30);
|
|
||||||
}}));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -45,11 +45,18 @@
|
||||||
<groupId>org.junit.jupiter</groupId>
|
<groupId>org.junit.jupiter</groupId>
|
||||||
<artifactId>junit-jupiter</artifactId>
|
<artifactId>junit-jupiter</artifactId>
|
||||||
<version>${junit-jupiter.version}</version>
|
<version>${junit-jupiter.version}</version>
|
||||||
|
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.junit.vintage</groupId>
|
||||||
|
<artifactId>junit-vintage-engine</artifactId>
|
||||||
|
<version>${junit-jupiter.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<junit-jupiter.version>5.10.2</junit-jupiter.version>
|
<junit-jupiter.version>5.6.2</junit-jupiter.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
</project>
|
</project>
|
Loading…
Reference in New Issue