diff --git a/README.md b/README.md index 6db41dd..6bea9c9 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ To use `sprox-json`, add the following dependency to your Maven POM: ``` -Note that you also need to include Sprox, at least version 3.1.3. That also means you need at least Java 8. +Note that you also need to include Sprox, at least version 4.0.0. That also means you need at least Java 8. Once your project is set up correctly, you can declare and use a Sprox processor like so (for example): @@ -128,7 +128,7 @@ And of course, it's up to you to handle this value. The easiest way to do this is to use the `JsonValueParserWrapper`. This parser implements the Sprox `Parser` interface and wraps another parser. It converts the ugly constant value back into an actual `null` value that it then returns. It passes any other String values to the parser it wraps. If you do this then in your controller classes all you need to do is define the parameter as an `Optional`, which is exactly what you would want to do anyway. -In case your processor needs to be able to map to all Java primitives and all values might be `null` in the JSON input, call the convience method `JsonValueParserWrapper.addDefaultJsonParsers(XmlProcessorBuilder builder)` to replace all Sprox built-in parsers with parsers that support JSON null values. +In case your processor needs to be able to map to all Java primitives and all values might be `null` in the JSON input, call the convenience method `JsonValueParserWrapper.addDefaultJsonParsers(XmlProcessorBuilder builder)` to replace all Sprox built-in parsers with parsers that support JSON null values. ## Custom root node name diff --git a/pom.xml b/pom.xml index 2c50a29..447d13a 100644 --- a/pom.xml +++ b/pom.xml @@ -41,12 +41,8 @@ - 3.1.3 + 4.0.0 4.11 - 5.0.0 - 4.2.1 - 3.3.0 - 1.0.13 @@ -59,19 +55,13 @@ javax.json javax.json-api - 1.0 - provided - - - org.osgi - org.osgi.core - ${osgi.core.version} + 1.1.4 provided org.glassfish javax.json - 1.0.4 + 1.1.4 test @@ -80,48 +70,14 @@ ${junit.version} test - - org.ops4j.pax.exam - pax-exam-junit4 - ${pax-exam.version} - test - - - org.ops4j.pax.exam - pax-exam-container-native - ${pax-exam.version} - test - - - org.ops4j.pax.exam - pax-exam-link-mvn - ${pax-exam.version} - test - - - org.apache.felix - org.apache.felix.framework - ${felix.version} - test - - - ch.qos.logback - logback-classic - ${logback.version} - test - - - 2.2.1 - - org.apache.maven.plugins maven-compiler-plugin - 3.1 + 3.8.1 1.8 1.8 @@ -141,7 +97,7 @@ org.jacoco jacoco-maven-plugin - 0.8.4 + 0.8.5 @@ -157,41 +113,10 @@ - org.apache.maven.plugins maven-jar-plugin - 2.4 - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - - - - - org.apache.felix - maven-bundle-plugin - 2.4.0 - - - nl.ulso.sprox.json - - - - - bundle-manifest - process-classes - - manifest - - - + 3.2.0 diff --git a/src/test/java/nl/ulso/sprox/json/osgi/OsgiBundleTest.java b/src/test/java/nl/ulso/sprox/json/osgi/OsgiBundleTest.java deleted file mode 100644 index a3a016d..0000000 --- a/src/test/java/nl/ulso/sprox/json/osgi/OsgiBundleTest.java +++ /dev/null @@ -1,43 +0,0 @@ -package nl.ulso.sprox.json.osgi; - -import nl.ulso.sprox.json.JsonValueParserWrapper; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.ops4j.pax.exam.Configuration; -import org.ops4j.pax.exam.Option; -import org.ops4j.pax.exam.junit.PaxExam; -import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy; -import org.ops4j.pax.exam.spi.reactors.PerClass; - -import static org.ops4j.pax.exam.CoreOptions.*; - -@RunWith(PaxExam.class) -@ExamReactorStrategy(PerClass.class) -public class OsgiBundleTest { - - @Configuration - public Option[] config() { - return options( - bundle("reference:file:target/classes"), // Add the compiler output as a bundle - mavenBundle("javax.json", "javax.json-api", "1.0"), - mavenBundle("nl.ulso.sprox", "sprox", "3.1.3"), - junitBundles() - ); - } - - @Test - public void testCreateJsonXmlInputFactory() throws Exception { - Class.forName("nl.ulso.sprox.json.JsonXmlInputFactory"); - } - - @Test - public void testJsonXmlConstants() throws Exception { - Class.forName("nl.ulso.sprox.json.JsonXmlConstants"); - } - - @Test - public void testJsonValueParserWrapper() throws Exception { - Class.forName("nl.ulso.sprox.json.JsonValueParserWrapper"); - JsonValueParserWrapper.withJsonNull(Integer::parseInt); - } -}