cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: [CXF-6644] Moving a basic JSON parser code into a dedicated module
Date Fri, 16 Oct 2015 13:29:28 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 07fbca8d5 -> b1c75b113


[CXF-6644] Moving a basic JSON parser code into a dedicated module


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/b1c75b11
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/b1c75b11
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/b1c75b11

Branch: refs/heads/3.0.x-fixes
Commit: b1c75b11380c2d45a1b4230843ebb39ac6c9353f
Parents: 07fbca8
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Fri Oct 16 14:26:22 2015 +0100
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Fri Oct 16 14:29:05 2015 +0100

----------------------------------------------------------------------
 rt/pom.xml                                      |   1 +
 rt/rs/description/pom.xml                       |   8 +-
 .../apache/cxf/jaxrs/swagger/SwaggerUtils.java  |   2 +-
 rt/rs/extensions/json-basic/pom.xml             |  54 ++++
 .../cxf/jaxrs/json/basic/JsonMapObject.java     | 102 ++++++
 .../json/basic/JsonMapObjectReaderWriter.java   | 307 +++++++++++++++++++
 .../basic/JsonMapObjectReaderWriterTest.java    |  50 +++
 rt/rs/extensions/providers/pom.xml              |   7 +
 .../cxf/jaxrs/provider/json/JsonMapObject.java  | 102 ------
 .../provider/json/JsonMapObjectProvider.java    |  19 +-
 .../json/JsonMapObjectReaderWriter.java         | 307 -------------------
 .../json/JsonMapObjectReaderWriterTest.java     |  50 ---
 rt/rs/security/jose/jose-core/pom.xml           |   8 +-
 .../rs/security/jose/common/JoseHeaders.java    |   2 +-
 .../jose/jwe/AbstractJweEncryption.java         |   2 +-
 .../security/jose/jwe/JweCompactConsumer.java   |   4 +-
 .../security/jose/jwe/JweCompactProducer.java   |   2 +-
 .../cxf/rs/security/jose/jwe/JweHeaders.java    |   2 +-
 .../rs/security/jose/jwe/JweJsonConsumer.java   |   2 +-
 .../jose/jwe/JweJsonEncryptionEntry.java        |   2 +-
 .../rs/security/jose/jwe/JweJsonProducer.java   |   2 +-
 .../jose/jwk/DefaultJwkReaderWriter.java        |   2 +-
 .../cxf/rs/security/jose/jwk/JsonWebKey.java    |   2 +-
 .../cxf/rs/security/jose/jwk/JsonWebKeys.java   |   2 +-
 .../cxf/rs/security/jose/jwk/JwkUtils.java      |   2 +-
 .../security/jose/jws/JwsCompactConsumer.java   |   4 +-
 .../security/jose/jws/JwsCompactProducer.java   |   2 +-
 .../rs/security/jose/jws/JwsJsonConsumer.java   |   4 +-
 .../rs/security/jose/jws/JwsJsonProducer.java   |   2 +-
 .../jose/jws/JwsJsonSignatureEntry.java         |   2 +-
 .../cxf/rs/security/jose/jwt/JwtClaims.java     |   2 +-
 .../security/jose/jwt/JwtTokenReaderWriter.java |   2 +-
 .../jose/cookbook/JwsJoseCookBookTest.java      |   2 +-
 .../jose/jaxrs/JwsJsonWriterInterceptor.java    |   2 +-
 .../jose/jaxrs/JwsWriterInterceptor.java        |   2 +-
 rt/rs/security/oauth-parent/oauth2/pom.xml      |   6 +
 .../client/JoseClientCodeStateManager.java      |   2 +-
 .../grants/code/JwtRequestCodeFilter.java       |   2 +-
 .../oauth2/utils/crypto/CryptoUtilsTest.java    |   1 +
 .../rs/security/oidc/common/UserAddress.java    |   2 +-
 systests/rs-security/pom.xml                    |   5 +
 41 files changed, 577 insertions(+), 508 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/b1c75b11/rt/pom.xml
----------------------------------------------------------------------
diff --git a/rt/pom.xml b/rt/pom.xml
index 6503b7c..ba07232 100644
--- a/rt/pom.xml
+++ b/rt/pom.xml
@@ -60,6 +60,7 @@
         <module>rs/client</module>
         <module>rs/http-sci</module>
         <module>rs/description</module>
+        <module>rs/extensions/json-basic</module>
         <module>rs/extensions/providers</module>
         <module>rs/extensions/search</module>
         <module>rs/security/xml</module>

http://git-wip-us.apache.org/repos/asf/cxf/blob/b1c75b11/rt/rs/description/pom.xml
----------------------------------------------------------------------
diff --git a/rt/rs/description/pom.xml b/rt/rs/description/pom.xml
index 19966e6..bb25e9b 100644
--- a/rt/rs/description/pom.xml
+++ b/rt/rs/description/pom.xml
@@ -67,12 +67,18 @@
         </dependency>
         <dependency>
             <groupId>org.apache.cxf</groupId>
-            <artifactId>cxf-rt-rs-extension-providers</artifactId>
+            <artifactId>cxf-rt-rs-json-basic</artifactId>
             <version>${project.version}</version>
             <scope>provided</scope>
             <optional>true</optional>
         </dependency>
         <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-rs-extension-providers</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
             <groupId>org.codehaus.jettison</groupId>
             <artifactId>jettison</artifactId>
             <scope>test</scope>

http://git-wip-us.apache.org/repos/asf/cxf/blob/b1c75b11/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/SwaggerUtils.java
----------------------------------------------------------------------
diff --git a/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/SwaggerUtils.java b/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/SwaggerUtils.java
index 7532361..2438458 100644
--- a/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/SwaggerUtils.java
+++ b/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/SwaggerUtils.java
@@ -32,11 +32,11 @@ import org.apache.cxf.common.classloader.ClassLoaderUtils;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.helpers.IOUtils;
+import org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter;
 import org.apache.cxf.jaxrs.model.Parameter;
 import org.apache.cxf.jaxrs.model.ParameterType;
 import org.apache.cxf.jaxrs.model.UserOperation;
 import org.apache.cxf.jaxrs.model.UserResource;
-import org.apache.cxf.jaxrs.provider.json.JsonMapObjectReaderWriter;
 import org.apache.cxf.jaxrs.utils.ResourceUtils;
 
 public final class SwaggerUtils {

http://git-wip-us.apache.org/repos/asf/cxf/blob/b1c75b11/rt/rs/extensions/json-basic/pom.xml
----------------------------------------------------------------------
diff --git a/rt/rs/extensions/json-basic/pom.xml b/rt/rs/extensions/json-basic/pom.xml
new file mode 100644
index 0000000..6effe1e
--- /dev/null
+++ b/rt/rs/extensions/json-basic/pom.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<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/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>cxf-rt-rs-json-basic</artifactId>
+    <packaging>bundle</packaging>
+    <name>Apache CXF JAX-RS Extensions: JSON Basic</name>
+    <description>Apache CXF JAX-RS Extensions: JSON Basic</description>
+    <url>http://cxf.apache.org</url>
+    <parent>
+        <groupId>org.apache.cxf</groupId>
+        <artifactId>cxf-parent</artifactId>
+        <version>3.1.4-SNAPSHOT</version>
+        <relativePath>../../../../parent/pom.xml</relativePath>
+    </parent>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.easymock</groupId>
+            <artifactId>easymock</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+        </plugins>
+    </build>
+</project>

http://git-wip-us.apache.org/repos/asf/cxf/blob/b1c75b11/rt/rs/extensions/json-basic/src/main/java/org/apache/cxf/jaxrs/json/basic/JsonMapObject.java
----------------------------------------------------------------------
diff --git a/rt/rs/extensions/json-basic/src/main/java/org/apache/cxf/jaxrs/json/basic/JsonMapObject.java b/rt/rs/extensions/json-basic/src/main/java/org/apache/cxf/jaxrs/json/basic/JsonMapObject.java
new file mode 100644
index 0000000..d0f6ad0
--- /dev/null
+++ b/rt/rs/extensions/json-basic/src/main/java/org/apache/cxf/jaxrs/json/basic/JsonMapObject.java
@@ -0,0 +1,102 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.jaxrs.json.basic;
+
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+public class JsonMapObject {
+    Map<String, Integer> updateCount;
+    Map<String, Object> values = new LinkedHashMap<String, Object>();
+    public JsonMapObject() {
+        
+    }
+    
+    public JsonMapObject(Map<String, Object> values) {
+        this.values = values;
+    }
+    
+    public void setProperty(String name, Object value) {
+        if (values.containsKey(name)) {
+            if (updateCount == null) {
+                updateCount = new LinkedHashMap<String, Integer>();
+            }
+            Integer count = updateCount.get(name);
+            count = count == null ? 2 : count++;
+            updateCount.put(name, count);
+        }
+        values.put(name, value);
+    }
+    
+    public boolean containsProperty(String name) {
+        return values.containsKey(name);
+    }
+    
+    public Object getProperty(String name) {
+        return values.get(name);
+    }
+
+    public Map<String, Object> asMap() {
+        return values;
+    }
+    public Integer getIntegerProperty(String name) {
+        Object value = getProperty(name);
+        if (value != null) {
+            return value instanceof Integer ? (Integer)value : Integer.parseInt(value.toString());
+        } else {
+            return null;
+        }
+    }
+    public Long getLongProperty(String name) {
+        Object value = getProperty(name);
+        if (value != null) {
+            return value instanceof Long ? (Long)value : Long.parseLong(value.toString());
+        } else {
+            return null;
+        }
+    }
+    public Boolean getBooleanProperty(String name) {
+        Object value = getProperty(name);
+        if (value != null) {
+            return value instanceof Boolean ? (Boolean)value : Boolean.parseBoolean(value.toString());
+        } else {
+            return null;
+        }
+    }
+    public String getStringProperty(String name) {
+        Object value = getProperty(name);
+        if (value != null) {
+            return value.toString();
+        } else {
+            return null;
+        }
+    }
+    public int hashCode() { 
+        return values.hashCode();
+    }
+    
+    public boolean equals(Object obj) {
+        return obj instanceof JsonMapObject && ((JsonMapObject)obj).values.equals(this.values);
+    }
+    public Map<String, Object> getUpdateCount() {
+        return updateCount == null ? null : Collections.<String, Object>unmodifiableMap(updateCount);
+    }
+}

http://git-wip-us.apache.org/repos/asf/cxf/blob/b1c75b11/rt/rs/extensions/json-basic/src/main/java/org/apache/cxf/jaxrs/json/basic/JsonMapObjectReaderWriter.java
----------------------------------------------------------------------
diff --git a/rt/rs/extensions/json-basic/src/main/java/org/apache/cxf/jaxrs/json/basic/JsonMapObjectReaderWriter.java b/rt/rs/extensions/json-basic/src/main/java/org/apache/cxf/jaxrs/json/basic/JsonMapObjectReaderWriter.java
new file mode 100644
index 0000000..1e80b70
--- /dev/null
+++ b/rt/rs/extensions/json-basic/src/main/java/org/apache/cxf/jaxrs/json/basic/JsonMapObjectReaderWriter.java
@@ -0,0 +1,307 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.jaxrs.json.basic;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.cxf.common.util.StringUtils;
+import org.apache.cxf.helpers.IOUtils;
+
+
+
+public class JsonMapObjectReaderWriter {
+    private boolean format;
+    
+    public JsonMapObjectReaderWriter() {
+        
+    }
+    public JsonMapObjectReaderWriter(boolean format) {
+        this.format = format;
+    }
+    
+    public String toJson(JsonMapObject obj) {
+        return toJson(obj.asMap());
+    }
+    
+    public String toJson(Map<String, Object> map) {
+        StringBuilder sb = new StringBuilder();
+        toJsonInternal(new StringBuilderOutput(sb), map);
+        return sb.toString();
+    }
+    
+    public String toJson(List<Object> list) {
+        StringBuilder sb = new StringBuilder();
+        toJsonInternal(new StringBuilderOutput(sb), list);
+        return sb.toString();
+    }
+    
+    public void toJson(JsonMapObject obj, OutputStream os) {
+        toJson(obj.asMap(), os);
+    }
+    
+    public void toJson(Map<String, Object> map, OutputStream os) {
+        toJsonInternal(new StreamOutput(os), map);
+    }
+
+    protected void toJsonInternal(Output out, Map<String, Object> map) {
+        out.append("{");
+        for (Iterator<Map.Entry<String, Object>> it = map.entrySet().iterator(); it.hasNext();) {
+            Map.Entry<String, Object> entry = it.next();
+            out.append("\"").append(entry.getKey()).append("\"");
+            out.append(":");
+            toJsonInternal(out, entry.getValue(), it.hasNext());
+        }
+        out.append("}");
+    }
+    
+    protected void toJsonInternal(Output out, Object[] array) {
+        toJsonInternal(out, Arrays.asList(array));
+    }
+    
+    protected void toJsonInternal(Output out, Collection<?> coll) {
+        out.append("[");
+        formatIfNeeded(out);
+        for (Iterator<?> iter = coll.iterator(); iter.hasNext();) {
+            toJsonInternal(out, iter.next(), iter.hasNext());
+        }
+        formatIfNeeded(out);
+        out.append("]");
+    }
+    
+    @SuppressWarnings("unchecked")
+    protected void toJsonInternal(Output out, Object value, boolean hasNext) {
+        if (JsonMapObject.class.isAssignableFrom(value.getClass())) {
+            out.append(toJson((JsonMapObject)value));
+        } else if (value.getClass().isArray()) {
+            toJsonInternal(out, (Object[])value);
+        } else if (Collection.class.isAssignableFrom(value.getClass())) {
+            toJsonInternal(out, (Collection<?>)value);
+        } else if (Map.class.isAssignableFrom(value.getClass())) {
+            toJsonInternal(out, (Map<String, Object>)value);
+        } else {
+            boolean stringOrEnum = value.getClass() == String.class || value.getClass().isEnum();
+            if (stringOrEnum) {
+                out.append("\"");
+            }
+            out.append(value.toString());
+            if (stringOrEnum) {
+                out.append("\"");
+            }
+        }
+        if (hasNext) {
+            out.append(",");
+            formatIfNeeded(out);
+        }
+        
+    }
+    
+    protected void formatIfNeeded(Output out) {
+        if (format) {
+            out.append("\r\n ");
+        }
+    }
+    public JsonMapObject fromJsonToJsonObject(InputStream is) throws IOException {
+        return fromJsonToJsonObject(IOUtils.toString(is));
+    }
+    public JsonMapObject fromJsonToJsonObject(String json) {
+        JsonMapObject obj = new JsonMapObject();
+        fromJson(obj, json);
+        return obj;
+    }    
+    public void fromJson(JsonMapObject obj, String json) {
+        String theJson = json.trim();
+        JsonObjectSettable settable = new JsonObjectSettable(obj);
+        readJsonObjectAsSettable(settable, theJson.substring(1, theJson.length() - 1));
+    }
+    public Map<String, Object> fromJson(InputStream is) throws IOException {
+        return fromJson(IOUtils.toString(is));
+    }
+    public Map<String, Object> fromJson(String json) {
+        String theJson = json.trim();
+        MapSettable nextMap = new MapSettable();
+        readJsonObjectAsSettable(nextMap, theJson.substring(1, theJson.length() - 1));
+        return nextMap.map;
+    }
+    public List<Object> fromJsonAsList(String json) {
+        return fromJsonAsList(null, json);
+    }
+    public List<Object> fromJsonAsList(String name, String json) {
+        String theJson = json.trim();
+        return internalFromJsonAsList(name, theJson.substring(1, theJson.length() - 1));
+    }
+    protected void readJsonObjectAsSettable(Settable values, String json) {
+        for (int i = 0; i < json.length(); i++) {
+            if (isWhiteSpace(json.charAt(i))) {
+                continue;
+            }
+            
+            int closingQuote = json.indexOf('"', i + 1);
+            int from = json.charAt(i) == '"' ? i + 1 : i;
+            String name = json.substring(from, closingQuote);
+            int sepIndex = json.indexOf(':', closingQuote + 1);
+            
+            int j = 1;
+            while (isWhiteSpace(json.charAt(sepIndex + j))) {
+                j++;
+            }
+            if (json.charAt(sepIndex + j) == '{') {
+                int closingIndex = getClosingIndex(json, '{', '}', sepIndex + j);
+                String newJson = json.substring(sepIndex + j + 1, closingIndex);
+                MapSettable nextMap = new MapSettable();
+                readJsonObjectAsSettable(nextMap, newJson);
+                values.put(name, nextMap.map);
+                i = closingIndex + 1;
+            } else if (json.charAt(sepIndex + j) == '[') {
+                int closingIndex = getClosingIndex(json, '[', ']', sepIndex + j);
+                String newJson = json.substring(sepIndex + j + 1, closingIndex);
+                values.put(name, internalFromJsonAsList(name, newJson));
+                i = closingIndex + 1;
+            } else {
+                int commaIndex = getCommaIndex(json, sepIndex + j);
+                Object value = readPrimitiveValue(name, json, sepIndex + j, commaIndex);
+                values.put(name, value);
+                i = commaIndex + 1;
+            }
+            
+        }
+    }
+    protected List<Object> internalFromJsonAsList(String name, String json) {
+        List<Object> values = new LinkedList<Object>();
+        for (int i = 0; i < json.length(); i++) {
+            if (isWhiteSpace(json.charAt(i))) {
+                continue;
+            }
+            if (json.charAt(i) == '{') {
+                int closingIndex = getClosingIndex(json, '{', '}', i);
+                MapSettable nextMap = new MapSettable();
+                readJsonObjectAsSettable(nextMap, json.substring(i + 1, closingIndex));
+                values.add(nextMap.map);
+                i = closingIndex + 1;
+            } else {
+                int commaIndex = getCommaIndex(json, i);
+                Object value = readPrimitiveValue(name, json, i, commaIndex);
+                values.add(value);
+                i = commaIndex;
+            }
+        }
+        
+        return values;
+    }
+    protected Object readPrimitiveValue(String name, String json, int from, int to) {
+        Object value = json.substring(from, to);
+        String valueStr = value.toString().trim(); 
+        if (valueStr.startsWith("\"")) {
+            value = valueStr.substring(1, valueStr.length() - 1);
+        } else if ("true".equals(valueStr) || "false".equals(valueStr)) {
+            value = Boolean.valueOf(valueStr);
+        } else {
+            try {
+                value = Long.valueOf(valueStr);
+            } catch (NumberFormatException ex) {
+                value = Double.valueOf(valueStr);
+            }
+        }
+        return value;
+    }
+    
+    protected static int getCommaIndex(String json, int from) {
+        int commaIndex = json.indexOf(",", from);
+        if (commaIndex == -1) {
+            commaIndex = json.length();
+        }
+        return commaIndex;
+    }
+    protected int getClosingIndex(String json, char openChar, char closeChar, int from) {
+        int nextOpenIndex = json.indexOf(openChar, from + 1);
+        int closingIndex = json.indexOf(closeChar, from + 1);
+        while (nextOpenIndex != -1 && nextOpenIndex < closingIndex) {
+            nextOpenIndex = json.indexOf(openChar, nextOpenIndex + 1);
+            closingIndex = json.indexOf(closeChar, closingIndex + 1);
+        }
+        return closingIndex;
+    }
+    protected boolean isWhiteSpace(char jsonChar) {
+        return jsonChar == ' ' || jsonChar == '\r' || jsonChar == '\n' || jsonChar == '\t';
+    }
+
+    public void setFormat(boolean format) {
+        this.format = format;
+    }
+
+    private interface Settable {
+        void put(String key, Object value);
+    }
+    private static class MapSettable implements Settable {
+        private Map<String, Object> map = new LinkedHashMap<String, Object>();
+        public void put(String key, Object value) {
+            map.put(key, value);
+        }
+        
+    }
+    private static class JsonObjectSettable implements Settable {
+        private JsonMapObject obj;
+        public JsonObjectSettable(JsonMapObject obj) {
+            this.obj = obj;
+        }
+        public void put(String key, Object value) {
+            obj.setProperty(key, value);
+        }
+    }
+    private interface Output {
+        Output append(String str);
+    }
+    private class StringBuilderOutput implements Output {
+        private StringBuilder sb;
+        public StringBuilderOutput(StringBuilder sb) {
+            this.sb = sb;
+        }
+        @Override
+        public Output append(String str) {
+            sb.append(str);
+            return this;
+        }
+        
+    }
+    private class StreamOutput implements Output {
+        private OutputStream os;
+        public StreamOutput(OutputStream os) {
+            this.os = os;
+        }
+        @Override
+        public Output append(String str) {
+            try {
+                os.write(StringUtils.toBytesUTF8(str));
+            } catch (IOException ex) {
+                throw new RuntimeException(ex);
+            }
+            return this;
+        }
+        
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/cxf/blob/b1c75b11/rt/rs/extensions/json-basic/src/test/java/org/apache/cxf/jaxrs/json/basic/JsonMapObjectReaderWriterTest.java
----------------------------------------------------------------------
diff --git a/rt/rs/extensions/json-basic/src/test/java/org/apache/cxf/jaxrs/json/basic/JsonMapObjectReaderWriterTest.java b/rt/rs/extensions/json-basic/src/test/java/org/apache/cxf/jaxrs/json/basic/JsonMapObjectReaderWriterTest.java
new file mode 100644
index 0000000..fc9dfee
--- /dev/null
+++ b/rt/rs/extensions/json-basic/src/test/java/org/apache/cxf/jaxrs/json/basic/JsonMapObjectReaderWriterTest.java
@@ -0,0 +1,50 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.jaxrs.json.basic;
+
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class JsonMapObjectReaderWriterTest extends Assert {
+
+    @Test
+    public void testWriteMap() throws Exception {
+        Map<String, Object> map = new LinkedHashMap<String, Object>();
+        map.put("a", "aValue");
+        map.put("b", 123);
+        map.put("c", Collections.singletonList("cValue"));
+        String json = new JsonMapObjectReaderWriter().toJson(map);
+        assertEquals("{\"a\":\"aValue\",\"b\":123,\"c\":[\"cValue\"]}", 
+                     json);
+    }
+    @Test
+    public void testReadMap() throws Exception {
+        String json = "{\"a\":\"aValue\",\"b\":123,\"c\":[\"cValue\"]}";
+        Map<String, Object> map = new JsonMapObjectReaderWriter().fromJson(json);
+        assertEquals(3, map.size());
+        assertEquals("aValue", map.get("a"));
+        assertEquals(123L, map.get("b"));
+        assertEquals(Collections.singletonList("cValue"), map.get("c"));
+    }
+}

http://git-wip-us.apache.org/repos/asf/cxf/blob/b1c75b11/rt/rs/extensions/providers/pom.xml
----------------------------------------------------------------------
diff --git a/rt/rs/extensions/providers/pom.xml b/rt/rs/extensions/providers/pom.xml
index e674b80..a50aed0 100644
--- a/rt/rs/extensions/providers/pom.xml
+++ b/rt/rs/extensions/providers/pom.xml
@@ -72,6 +72,13 @@
             </exclusions>
         </dependency>
         <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-rs-json-basic</artifactId>
+            <version>${project.version}</version>
+            <scope>provided</scope>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
             <groupId>org.codehaus.jettison</groupId>
             <artifactId>jettison</artifactId>
             <scope>provided</scope>

http://git-wip-us.apache.org/repos/asf/cxf/blob/b1c75b11/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/JsonMapObject.java
----------------------------------------------------------------------
diff --git a/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/JsonMapObject.java b/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/JsonMapObject.java
deleted file mode 100644
index 5740f73..0000000
--- a/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/JsonMapObject.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.cxf.jaxrs.provider.json;
-
-import java.util.Collections;
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-public class JsonMapObject {
-    Map<String, Integer> updateCount;
-    Map<String, Object> values = new LinkedHashMap<String, Object>();
-    public JsonMapObject() {
-        
-    }
-    
-    public JsonMapObject(Map<String, Object> values) {
-        this.values = values;
-    }
-    
-    public void setProperty(String name, Object value) {
-        if (values.containsKey(name)) {
-            if (updateCount == null) {
-                updateCount = new LinkedHashMap<String, Integer>();
-            }
-            Integer count = updateCount.get(name);
-            count = count == null ? 2 : count++;
-            updateCount.put(name, count);
-        }
-        values.put(name, value);
-    }
-    
-    public boolean containsProperty(String name) {
-        return values.containsKey(name);
-    }
-    
-    public Object getProperty(String name) {
-        return values.get(name);
-    }
-
-    public Map<String, Object> asMap() {
-        return values;
-    }
-    public Integer getIntegerProperty(String name) {
-        Object value = getProperty(name);
-        if (value != null) {
-            return value instanceof Integer ? (Integer)value : Integer.parseInt(value.toString());
-        } else {
-            return null;
-        }
-    }
-    public Long getLongProperty(String name) {
-        Object value = getProperty(name);
-        if (value != null) {
-            return value instanceof Long ? (Long)value : Long.parseLong(value.toString());
-        } else {
-            return null;
-        }
-    }
-    public Boolean getBooleanProperty(String name) {
-        Object value = getProperty(name);
-        if (value != null) {
-            return value instanceof Boolean ? (Boolean)value : Boolean.parseBoolean(value.toString());
-        } else {
-            return null;
-        }
-    }
-    public String getStringProperty(String name) {
-        Object value = getProperty(name);
-        if (value != null) {
-            return value.toString();
-        } else {
-            return null;
-        }
-    }
-    public int hashCode() { 
-        return values.hashCode();
-    }
-    
-    public boolean equals(Object obj) {
-        return obj instanceof JsonMapObject && ((JsonMapObject)obj).values.equals(this.values);
-    }
-    public Map<String, Object> getUpdateCount() {
-        return updateCount == null ? null : Collections.<String, Object>unmodifiableMap(updateCount);
-    }
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/b1c75b11/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/JsonMapObjectProvider.java
----------------------------------------------------------------------
diff --git a/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/JsonMapObjectProvider.java b/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/JsonMapObjectProvider.java
index a8b68ad..ee57369 100644
--- a/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/JsonMapObjectProvider.java
+++ b/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/JsonMapObjectProvider.java
@@ -34,6 +34,8 @@ import javax.ws.rs.ext.MessageBodyWriter;
 import javax.ws.rs.ext.Provider;
 
 import org.apache.cxf.helpers.IOUtils;
+import org.apache.cxf.jaxrs.json.basic.JsonMapObject;
+import org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter;
 
 @Produces({"application/json", "application/*+json" })
 @Consumes({"application/json", "application/*+json" })
@@ -67,19 +69,12 @@ public class JsonMapObjectProvider implements MessageBodyReader<JsonMapObject>,
                                   MultivaluedMap<String, String> headers, InputStream is) throws IOException,
         WebApplicationException {
         String s = IOUtils.readStringFromStream(is);
-        JsonMapObject obj = new JsonMapObject(); 
-        handler.fromJson(obj, s);
-        if (cls == JsonMapObject.class) {
+        try {
+            JsonMapObject obj = cls == JsonMapObject.class ? new JsonMapObject() : (JsonMapObject)cls.newInstance(); 
+            handler.fromJson(obj, s);
             return obj;
-        } else {
-            try {
-                JsonMapObject actualObj = (JsonMapObject)cls.newInstance();
-                actualObj.values = obj.values;
-                actualObj.updateCount = obj.updateCount;
-                return actualObj;
-            } catch (Exception ex) {
-                throw new IOException(ex);
-            }
+        } catch (Exception ex) {
+            throw new IOException(ex);
         }
         
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/b1c75b11/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/JsonMapObjectReaderWriter.java
----------------------------------------------------------------------
diff --git a/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/JsonMapObjectReaderWriter.java b/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/JsonMapObjectReaderWriter.java
deleted file mode 100644
index e7cfd61..0000000
--- a/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/JsonMapObjectReaderWriter.java
+++ /dev/null
@@ -1,307 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.jaxrs.provider.json;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.cxf.common.util.StringUtils;
-import org.apache.cxf.helpers.IOUtils;
-
-
-
-public class JsonMapObjectReaderWriter {
-    private boolean format;
-    
-    public JsonMapObjectReaderWriter() {
-        
-    }
-    public JsonMapObjectReaderWriter(boolean format) {
-        this.format = format;
-    }
-    
-    public String toJson(JsonMapObject obj) {
-        return toJson(obj.asMap());
-    }
-    
-    public String toJson(Map<String, Object> map) {
-        StringBuilder sb = new StringBuilder();
-        toJsonInternal(new StringBuilderOutput(sb), map);
-        return sb.toString();
-    }
-    
-    public String toJson(List<Object> list) {
-        StringBuilder sb = new StringBuilder();
-        toJsonInternal(new StringBuilderOutput(sb), list);
-        return sb.toString();
-    }
-    
-    public void toJson(JsonMapObject obj, OutputStream os) {
-        toJson(obj.asMap(), os);
-    }
-    
-    public void toJson(Map<String, Object> map, OutputStream os) {
-        toJsonInternal(new StreamOutput(os), map);
-    }
-
-    protected void toJsonInternal(Output out, Map<String, Object> map) {
-        out.append("{");
-        for (Iterator<Map.Entry<String, Object>> it = map.entrySet().iterator(); it.hasNext();) {
-            Map.Entry<String, Object> entry = it.next();
-            out.append("\"").append(entry.getKey()).append("\"");
-            out.append(":");
-            toJsonInternal(out, entry.getValue(), it.hasNext());
-        }
-        out.append("}");
-    }
-    
-    protected void toJsonInternal(Output out, Object[] array) {
-        toJsonInternal(out, Arrays.asList(array));
-    }
-    
-    protected void toJsonInternal(Output out, Collection<?> coll) {
-        out.append("[");
-        formatIfNeeded(out);
-        for (Iterator<?> iter = coll.iterator(); iter.hasNext();) {
-            toJsonInternal(out, iter.next(), iter.hasNext());
-        }
-        formatIfNeeded(out);
-        out.append("]");
-    }
-    
-    @SuppressWarnings("unchecked")
-    protected void toJsonInternal(Output out, Object value, boolean hasNext) {
-        if (JsonMapObject.class.isAssignableFrom(value.getClass())) {
-            out.append(toJson((JsonMapObject)value));
-        } else if (value.getClass().isArray()) {
-            toJsonInternal(out, (Object[])value);
-        } else if (Collection.class.isAssignableFrom(value.getClass())) {
-            toJsonInternal(out, (Collection<?>)value);
-        } else if (Map.class.isAssignableFrom(value.getClass())) {
-            toJsonInternal(out, (Map<String, Object>)value);
-        } else {
-            boolean stringOrEnum = value.getClass() == String.class || value.getClass().isEnum();
-            if (stringOrEnum) {
-                out.append("\"");
-            }
-            out.append(value.toString());
-            if (stringOrEnum) {
-                out.append("\"");
-            }
-        }
-        if (hasNext) {
-            out.append(",");
-            formatIfNeeded(out);
-        }
-        
-    }
-    
-    protected void formatIfNeeded(Output out) {
-        if (format) {
-            out.append("\r\n ");
-        }
-    }
-    public JsonMapObject fromJsonToJsonObject(InputStream is) throws IOException {
-        return fromJsonToJsonObject(IOUtils.toString(is));
-    }
-    public JsonMapObject fromJsonToJsonObject(String json) {
-        JsonMapObject obj = new JsonMapObject();
-        fromJson(obj, json);
-        return obj;
-    }    
-    public void fromJson(JsonMapObject obj, String json) {
-        String theJson = json.trim();
-        JsonObjectSettable settable = new JsonObjectSettable(obj);
-        readJsonObjectAsSettable(settable, theJson.substring(1, theJson.length() - 1));
-    }
-    public Map<String, Object> fromJson(InputStream is) throws IOException {
-        return fromJson(IOUtils.toString(is));
-    }
-    public Map<String, Object> fromJson(String json) {
-        String theJson = json.trim();
-        MapSettable nextMap = new MapSettable();
-        readJsonObjectAsSettable(nextMap, theJson.substring(1, theJson.length() - 1));
-        return nextMap.map;
-    }
-    public List<Object> fromJsonAsList(String json) {
-        return fromJsonAsList(null, json);
-    }
-    public List<Object> fromJsonAsList(String name, String json) {
-        String theJson = json.trim();
-        return internalFromJsonAsList(name, theJson.substring(1, theJson.length() - 1));
-    }
-    protected void readJsonObjectAsSettable(Settable values, String json) {
-        for (int i = 0; i < json.length(); i++) {
-            if (isWhiteSpace(json.charAt(i))) {
-                continue;
-            }
-            
-            int closingQuote = json.indexOf('"', i + 1);
-            int from = json.charAt(i) == '"' ? i + 1 : i;
-            String name = json.substring(from, closingQuote);
-            int sepIndex = json.indexOf(':', closingQuote + 1);
-            
-            int j = 1;
-            while (isWhiteSpace(json.charAt(sepIndex + j))) {
-                j++;
-            }
-            if (json.charAt(sepIndex + j) == '{') {
-                int closingIndex = getClosingIndex(json, '{', '}', sepIndex + j);
-                String newJson = json.substring(sepIndex + j + 1, closingIndex);
-                MapSettable nextMap = new MapSettable();
-                readJsonObjectAsSettable(nextMap, newJson);
-                values.put(name, nextMap.map);
-                i = closingIndex + 1;
-            } else if (json.charAt(sepIndex + j) == '[') {
-                int closingIndex = getClosingIndex(json, '[', ']', sepIndex + j);
-                String newJson = json.substring(sepIndex + j + 1, closingIndex);
-                values.put(name, internalFromJsonAsList(name, newJson));
-                i = closingIndex + 1;
-            } else {
-                int commaIndex = getCommaIndex(json, sepIndex + j);
-                Object value = readPrimitiveValue(name, json, sepIndex + j, commaIndex);
-                values.put(name, value);
-                i = commaIndex + 1;
-            }
-            
-        }
-    }
-    protected List<Object> internalFromJsonAsList(String name, String json) {
-        List<Object> values = new LinkedList<Object>();
-        for (int i = 0; i < json.length(); i++) {
-            if (isWhiteSpace(json.charAt(i))) {
-                continue;
-            }
-            if (json.charAt(i) == '{') {
-                int closingIndex = getClosingIndex(json, '{', '}', i);
-                MapSettable nextMap = new MapSettable();
-                readJsonObjectAsSettable(nextMap, json.substring(i + 1, closingIndex));
-                values.add(nextMap.map);
-                i = closingIndex + 1;
-            } else {
-                int commaIndex = getCommaIndex(json, i);
-                Object value = readPrimitiveValue(name, json, i, commaIndex);
-                values.add(value);
-                i = commaIndex;
-            }
-        }
-        
-        return values;
-    }
-    protected Object readPrimitiveValue(String name, String json, int from, int to) {
-        Object value = json.substring(from, to);
-        String valueStr = value.toString().trim(); 
-        if (valueStr.startsWith("\"")) {
-            value = valueStr.substring(1, valueStr.length() - 1);
-        } else if ("true".equals(valueStr) || "false".equals(valueStr)) {
-            value = Boolean.valueOf(valueStr);
-        } else {
-            try {
-                value = Long.valueOf(valueStr);
-            } catch (NumberFormatException ex) {
-                value = Double.valueOf(valueStr);
-            }
-        }
-        return value;
-    }
-    
-    protected static int getCommaIndex(String json, int from) {
-        int commaIndex = json.indexOf(",", from);
-        if (commaIndex == -1) {
-            commaIndex = json.length();
-        }
-        return commaIndex;
-    }
-    protected int getClosingIndex(String json, char openChar, char closeChar, int from) {
-        int nextOpenIndex = json.indexOf(openChar, from + 1);
-        int closingIndex = json.indexOf(closeChar, from + 1);
-        while (nextOpenIndex != -1 && nextOpenIndex < closingIndex) {
-            nextOpenIndex = json.indexOf(openChar, nextOpenIndex + 1);
-            closingIndex = json.indexOf(closeChar, closingIndex + 1);
-        }
-        return closingIndex;
-    }
-    protected boolean isWhiteSpace(char jsonChar) {
-        return jsonChar == ' ' || jsonChar == '\r' || jsonChar == '\n' || jsonChar == '\t';
-    }
-
-    public void setFormat(boolean format) {
-        this.format = format;
-    }
-
-    private interface Settable {
-        void put(String key, Object value);
-    }
-    private static class MapSettable implements Settable {
-        private Map<String, Object> map = new LinkedHashMap<String, Object>();
-        public void put(String key, Object value) {
-            map.put(key, value);
-        }
-        
-    }
-    private static class JsonObjectSettable implements Settable {
-        private JsonMapObject obj;
-        public JsonObjectSettable(JsonMapObject obj) {
-            this.obj = obj;
-        }
-        public void put(String key, Object value) {
-            obj.setProperty(key, value);
-        }
-    }
-    private interface Output {
-        Output append(String str);
-    }
-    private class StringBuilderOutput implements Output {
-        private StringBuilder sb;
-        public StringBuilderOutput(StringBuilder sb) {
-            this.sb = sb;
-        }
-        @Override
-        public Output append(String str) {
-            sb.append(str);
-            return this;
-        }
-        
-    }
-    private class StreamOutput implements Output {
-        private OutputStream os;
-        public StreamOutput(OutputStream os) {
-            this.os = os;
-        }
-        @Override
-        public Output append(String str) {
-            try {
-                os.write(StringUtils.toBytesUTF8(str));
-            } catch (IOException ex) {
-                throw new RuntimeException(ex);
-            }
-            return this;
-        }
-        
-    }
-    
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/b1c75b11/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/provider/json/JsonMapObjectReaderWriterTest.java
----------------------------------------------------------------------
diff --git a/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/provider/json/JsonMapObjectReaderWriterTest.java b/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/provider/json/JsonMapObjectReaderWriterTest.java
deleted file mode 100644
index dcee285..0000000
--- a/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/provider/json/JsonMapObjectReaderWriterTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.cxf.jaxrs.provider.json;
-
-import java.util.Collections;
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-public class JsonMapObjectReaderWriterTest extends Assert {
-
-    @Test
-    public void testWriteMap() throws Exception {
-        Map<String, Object> map = new LinkedHashMap<String, Object>();
-        map.put("a", "aValue");
-        map.put("b", 123);
-        map.put("c", Collections.singletonList("cValue"));
-        String json = new JsonMapObjectReaderWriter().toJson(map);
-        assertEquals("{\"a\":\"aValue\",\"b\":123,\"c\":[\"cValue\"]}", 
-                     json);
-    }
-    @Test
-    public void testReadMap() throws Exception {
-        String json = "{\"a\":\"aValue\",\"b\":123,\"c\":[\"cValue\"]}";
-        Map<String, Object> map = new JsonMapObjectReaderWriter().fromJson(json);
-        assertEquals(3, map.size());
-        assertEquals("aValue", map.get("a"));
-        assertEquals(123L, map.get("b"));
-        assertEquals(Collections.singletonList("cValue"), map.get("c"));
-    }
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/b1c75b11/rt/rs/security/jose/jose-core/pom.xml
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/jose-core/pom.xml b/rt/rs/security/jose/jose-core/pom.xml
index 2f91041..e1d878b 100644
--- a/rt/rs/security/jose/jose-core/pom.xml
+++ b/rt/rs/security/jose/jose-core/pom.xml
@@ -43,14 +43,8 @@
         </dependency>
         <dependency>
             <groupId>org.apache.cxf</groupId>
-            <artifactId>cxf-rt-rs-extension-providers</artifactId>
+            <artifactId>cxf-rt-rs-json-basic</artifactId>
             <version>${project.version}</version>
-            <exclusions>
-              <exclusion>
-                <groupId>org.apache.cxf</groupId>
-                <artifactId>cxf-rt-frontend-jaxrs</artifactId>
-              </exclusion>
-            </exclusions>
         </dependency>
         <dependency>
             <groupId>org.bouncycastle</groupId>

http://git-wip-us.apache.org/repos/asf/cxf/blob/b1c75b11/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/common/JoseHeaders.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/common/JoseHeaders.java b/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/common/JoseHeaders.java
index 308264e..3160232 100644
--- a/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/common/JoseHeaders.java
+++ b/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/common/JoseHeaders.java
@@ -23,7 +23,7 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.cxf.helpers.CastUtils;
-import org.apache.cxf.jaxrs.provider.json.JsonMapObject;
+import org.apache.cxf.jaxrs.json.basic.JsonMapObject;
 import org.apache.cxf.rs.security.jose.jwk.JsonWebKey;
 
 public abstract class JoseHeaders extends JsonMapObject {

http://git-wip-us.apache.org/repos/asf/cxf/blob/b1c75b11/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwe/AbstractJweEncryption.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwe/AbstractJweEncryption.java b/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwe/AbstractJweEncryption.java
index acc9933..a7117ff 100644
--- a/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwe/AbstractJweEncryption.java
+++ b/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwe/AbstractJweEncryption.java
@@ -27,7 +27,7 @@ import javax.crypto.Cipher;
 import javax.crypto.SecretKey;
 
 import org.apache.cxf.common.logging.LogUtils;
-import org.apache.cxf.jaxrs.provider.json.JsonMapObjectReaderWriter;
+import org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter;
 import org.apache.cxf.rs.security.jose.common.JoseConstants;
 import org.apache.cxf.rs.security.jose.jwa.AlgorithmUtils;
 import org.apache.cxf.rs.security.jose.jwa.ContentAlgorithm;

http://git-wip-us.apache.org/repos/asf/cxf/blob/b1c75b11/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweCompactConsumer.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweCompactConsumer.java b/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweCompactConsumer.java
index 73a4646..eb0c2a7 100644
--- a/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweCompactConsumer.java
+++ b/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweCompactConsumer.java
@@ -25,8 +25,8 @@ import java.util.logging.Logger;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.Base64Exception;
 import org.apache.cxf.common.util.Base64UrlUtility;
-import org.apache.cxf.jaxrs.provider.json.JsonMapObject;
-import org.apache.cxf.jaxrs.provider.json.JsonMapObjectReaderWriter;
+import org.apache.cxf.jaxrs.json.basic.JsonMapObject;
+import org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter;
 import org.apache.cxf.rs.security.jose.common.JoseException;
 import org.apache.cxf.rs.security.jose.common.JoseUtils;
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/b1c75b11/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweCompactProducer.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweCompactProducer.java b/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweCompactProducer.java
index 53e7ec3..b7d8e2c 100644
--- a/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweCompactProducer.java
+++ b/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweCompactProducer.java
@@ -24,7 +24,7 @@ import java.io.OutputStream;
 
 import org.apache.cxf.common.util.Base64UrlUtility;
 import org.apache.cxf.common.util.StringUtils;
-import org.apache.cxf.jaxrs.provider.json.JsonMapObjectReaderWriter;
+import org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter;
 
 
 public class JweCompactProducer {

http://git-wip-us.apache.org/repos/asf/cxf/blob/b1c75b11/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweHeaders.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweHeaders.java b/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweHeaders.java
index 7345cf5..d632777 100644
--- a/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweHeaders.java
+++ b/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweHeaders.java
@@ -23,7 +23,7 @@ import java.util.Map;
 
 import org.apache.cxf.common.util.Base64UrlUtility;
 import org.apache.cxf.common.util.StringUtils;
-import org.apache.cxf.jaxrs.provider.json.JsonMapObjectReaderWriter;
+import org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter;
 import org.apache.cxf.rs.security.jose.common.JoseConstants;
 import org.apache.cxf.rs.security.jose.common.JoseHeaders;
 import org.apache.cxf.rs.security.jose.common.JoseType;

http://git-wip-us.apache.org/repos/asf/cxf/blob/b1c75b11/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweJsonConsumer.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweJsonConsumer.java b/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweJsonConsumer.java
index 75fafbd..3535208 100644
--- a/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweJsonConsumer.java
+++ b/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweJsonConsumer.java
@@ -28,7 +28,7 @@ import java.util.logging.Logger;
 
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.helpers.CastUtils;
-import org.apache.cxf.jaxrs.provider.json.JsonMapObjectReaderWriter;
+import org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter;
 import org.apache.cxf.rs.security.jose.common.JoseException;
 import org.apache.cxf.rs.security.jose.common.JoseUtils;
 import org.apache.cxf.rs.security.jose.jwa.KeyAlgorithm;

http://git-wip-us.apache.org/repos/asf/cxf/blob/b1c75b11/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweJsonEncryptionEntry.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweJsonEncryptionEntry.java b/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweJsonEncryptionEntry.java
index 3f45955..d744892 100644
--- a/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweJsonEncryptionEntry.java
+++ b/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweJsonEncryptionEntry.java
@@ -21,7 +21,7 @@ package org.apache.cxf.rs.security.jose.jwe;
 import java.util.LinkedHashMap;
 import java.util.Map;
 
-import org.apache.cxf.jaxrs.provider.json.JsonMapObjectReaderWriter;
+import org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter;
 import org.apache.cxf.rs.security.jose.common.JoseUtils;
 
 public class JweJsonEncryptionEntry {

http://git-wip-us.apache.org/repos/asf/cxf/blob/b1c75b11/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweJsonProducer.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweJsonProducer.java b/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweJsonProducer.java
index 5278a3d..661a537 100644
--- a/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweJsonProducer.java
+++ b/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweJsonProducer.java
@@ -29,7 +29,7 @@ import java.util.logging.Logger;
 
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.Base64UrlUtility;
-import org.apache.cxf.jaxrs.provider.json.JsonMapObjectReaderWriter;
+import org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter;
 import org.apache.cxf.rs.security.jose.common.JoseConstants;
 
 public class JweJsonProducer {

http://git-wip-us.apache.org/repos/asf/cxf/blob/b1c75b11/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwk/DefaultJwkReaderWriter.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwk/DefaultJwkReaderWriter.java b/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwk/DefaultJwkReaderWriter.java
index 5593e0b..dec8006 100644
--- a/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwk/DefaultJwkReaderWriter.java
+++ b/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwk/DefaultJwkReaderWriter.java
@@ -18,7 +18,7 @@
  */
 package org.apache.cxf.rs.security.jose.jwk;
 
-import org.apache.cxf.jaxrs.provider.json.JsonMapObjectReaderWriter;
+import org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter;
 
 
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/b1c75b11/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwk/JsonWebKey.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwk/JsonWebKey.java b/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwk/JsonWebKey.java
index 9f1795a..6a064e8 100644
--- a/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwk/JsonWebKey.java
+++ b/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwk/JsonWebKey.java
@@ -23,7 +23,7 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.cxf.helpers.CastUtils;
-import org.apache.cxf.jaxrs.provider.json.JsonMapObject;
+import org.apache.cxf.jaxrs.json.basic.JsonMapObject;
 import org.apache.cxf.rs.security.jose.common.JoseConstants;
 
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/b1c75b11/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwk/JsonWebKeys.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwk/JsonWebKeys.java b/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwk/JsonWebKeys.java
index 55a19f6..28011b3 100644
--- a/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwk/JsonWebKeys.java
+++ b/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwk/JsonWebKeys.java
@@ -25,7 +25,7 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.cxf.helpers.CastUtils;
-import org.apache.cxf.jaxrs.provider.json.JsonMapObject;
+import org.apache.cxf.jaxrs.json.basic.JsonMapObject;
 
 public class JsonWebKeys extends JsonMapObject {
     public static final String KEYS_PROPERTY = "keys";

http://git-wip-us.apache.org/repos/asf/cxf/blob/b1c75b11/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwk/JwkUtils.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwk/JwkUtils.java b/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwk/JwkUtils.java
index 33eb305..cb76567 100644
--- a/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwk/JwkUtils.java
+++ b/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwk/JwkUtils.java
@@ -45,7 +45,7 @@ import org.apache.cxf.common.util.Base64UrlUtility;
 import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.helpers.IOUtils;
-import org.apache.cxf.jaxrs.provider.json.JsonMapObjectReaderWriter;
+import org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.message.MessageUtils;
 import org.apache.cxf.rs.security.jose.common.JoseConstants;

http://git-wip-us.apache.org/repos/asf/cxf/blob/b1c75b11/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsCompactConsumer.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsCompactConsumer.java b/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsCompactConsumer.java
index be48bcc..9d57222 100644
--- a/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsCompactConsumer.java
+++ b/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsCompactConsumer.java
@@ -24,8 +24,8 @@ import java.util.logging.Logger;
 
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.StringUtils;
-import org.apache.cxf.jaxrs.provider.json.JsonMapObject;
-import org.apache.cxf.jaxrs.provider.json.JsonMapObjectReaderWriter;
+import org.apache.cxf.jaxrs.json.basic.JsonMapObject;
+import org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter;
 import org.apache.cxf.rs.security.jose.common.JoseUtils;
 import org.apache.cxf.rs.security.jose.jwa.SignatureAlgorithm;
 import org.apache.cxf.rs.security.jose.jwk.JsonWebKey;

http://git-wip-us.apache.org/repos/asf/cxf/blob/b1c75b11/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsCompactProducer.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsCompactProducer.java b/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsCompactProducer.java
index 06e1dbd..5b4c760 100644
--- a/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsCompactProducer.java
+++ b/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsCompactProducer.java
@@ -23,7 +23,7 @@ import java.util.Properties;
 
 import org.apache.cxf.common.util.Base64UrlUtility;
 import org.apache.cxf.common.util.StringUtils;
-import org.apache.cxf.jaxrs.provider.json.JsonMapObjectReaderWriter;
+import org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.phase.PhaseInterceptorChain;
 import org.apache.cxf.rs.security.jose.common.JoseConstants;

http://git-wip-us.apache.org/repos/asf/cxf/blob/b1c75b11/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsJsonConsumer.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsJsonConsumer.java b/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsJsonConsumer.java
index 7374806..3ad5b45 100644
--- a/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsJsonConsumer.java
+++ b/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsJsonConsumer.java
@@ -28,8 +28,8 @@ import java.util.logging.Logger;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.helpers.CastUtils;
-import org.apache.cxf.jaxrs.provider.json.JsonMapObject;
-import org.apache.cxf.jaxrs.provider.json.JsonMapObjectReaderWriter;
+import org.apache.cxf.jaxrs.json.basic.JsonMapObject;
+import org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter;
 import org.apache.cxf.rs.security.jose.common.JoseUtils;
 import org.apache.cxf.rs.security.jose.jwa.SignatureAlgorithm;
 import org.apache.cxf.rs.security.jose.jwk.JsonWebKey;

http://git-wip-us.apache.org/repos/asf/cxf/blob/b1c75b11/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsJsonProducer.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsJsonProducer.java b/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsJsonProducer.java
index eb5f789..e96a630 100644
--- a/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsJsonProducer.java
+++ b/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsJsonProducer.java
@@ -29,7 +29,7 @@ import java.util.logging.Logger;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.Base64UrlUtility;
 import org.apache.cxf.common.util.StringUtils;
-import org.apache.cxf.jaxrs.provider.json.JsonMapObjectReaderWriter;
+import org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter;
 import org.apache.cxf.rs.security.jose.common.JoseConstants;
 import org.apache.cxf.rs.security.jose.common.JoseHeaders;
 import org.apache.cxf.rs.security.jose.jwa.SignatureAlgorithm;

http://git-wip-us.apache.org/repos/asf/cxf/blob/b1c75b11/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsJsonSignatureEntry.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsJsonSignatureEntry.java b/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsJsonSignatureEntry.java
index 8e858a1..85f89df 100644
--- a/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsJsonSignatureEntry.java
+++ b/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsJsonSignatureEntry.java
@@ -24,7 +24,7 @@ import java.util.logging.Logger;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.Base64UrlUtility;
 import org.apache.cxf.common.util.StringUtils;
-import org.apache.cxf.jaxrs.provider.json.JsonMapObjectReaderWriter;
+import org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter;
 import org.apache.cxf.rs.security.jose.common.JoseConstants;
 import org.apache.cxf.rs.security.jose.common.JoseUtils;
 import org.apache.cxf.rs.security.jose.jwk.JsonWebKey;

http://git-wip-us.apache.org/repos/asf/cxf/blob/b1c75b11/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtClaims.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtClaims.java b/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtClaims.java
index 871e57a..6fcc85d 100644
--- a/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtClaims.java
+++ b/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtClaims.java
@@ -21,7 +21,7 @@ package org.apache.cxf.rs.security.jose.jwt;
 
 import java.util.Map;
 
-import org.apache.cxf.jaxrs.provider.json.JsonMapObject;
+import org.apache.cxf.jaxrs.json.basic.JsonMapObject;
 
 
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/b1c75b11/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtTokenReaderWriter.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtTokenReaderWriter.java b/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtTokenReaderWriter.java
index 0ebf8a3..fba861e 100644
--- a/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtTokenReaderWriter.java
+++ b/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtTokenReaderWriter.java
@@ -22,7 +22,7 @@ import java.util.Arrays;
 import java.util.HashSet;
 import java.util.Set;
 
-import org.apache.cxf.jaxrs.provider.json.JsonMapObjectReaderWriter;
+import org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter;
 
 
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/b1c75b11/rt/rs/security/jose/jose-core/src/test/java/org/apache/cxf/rs/security/jose/cookbook/JwsJoseCookBookTest.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/jose-core/src/test/java/org/apache/cxf/rs/security/jose/cookbook/JwsJoseCookBookTest.java b/rt/rs/security/jose/jose-core/src/test/java/org/apache/cxf/rs/security/jose/cookbook/JwsJoseCookBookTest.java
index 40fb210..3902cf7 100644
--- a/rt/rs/security/jose/jose-core/src/test/java/org/apache/cxf/rs/security/jose/cookbook/JwsJoseCookBookTest.java
+++ b/rt/rs/security/jose/jose-core/src/test/java/org/apache/cxf/rs/security/jose/cookbook/JwsJoseCookBookTest.java
@@ -26,7 +26,7 @@ import javax.crypto.Cipher;
 
 import org.apache.cxf.common.util.Base64UrlUtility;
 import org.apache.cxf.helpers.IOUtils;
-import org.apache.cxf.jaxrs.provider.json.JsonMapObjectReaderWriter;
+import org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter;
 import org.apache.cxf.rs.security.jose.jwa.AlgorithmUtils;
 import org.apache.cxf.rs.security.jose.jwa.SignatureAlgorithm;
 import org.apache.cxf.rs.security.jose.jwk.JsonWebKey;

http://git-wip-us.apache.org/repos/asf/cxf/blob/b1c75b11/rt/rs/security/jose/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsJsonWriterInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsJsonWriterInterceptor.java b/rt/rs/security/jose/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsJsonWriterInterceptor.java
index 6e68dc2..9522b9b 100644
--- a/rt/rs/security/jose/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsJsonWriterInterceptor.java
+++ b/rt/rs/security/jose/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsJsonWriterInterceptor.java
@@ -33,7 +33,7 @@ import org.apache.cxf.common.util.Base64UrlOutputStream;
 import org.apache.cxf.common.util.Base64UrlUtility;
 import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.io.CachedOutputStream;
-import org.apache.cxf.jaxrs.provider.json.JsonMapObjectReaderWriter;
+import org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter;
 import org.apache.cxf.jaxrs.utils.JAXRSUtils;
 import org.apache.cxf.rs.security.jose.common.JoseConstants;
 import org.apache.cxf.rs.security.jose.common.JoseHeaders;

http://git-wip-us.apache.org/repos/asf/cxf/blob/b1c75b11/rt/rs/security/jose/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsWriterInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsWriterInterceptor.java b/rt/rs/security/jose/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsWriterInterceptor.java
index 36e44ca..1104a2d 100644
--- a/rt/rs/security/jose/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsWriterInterceptor.java
+++ b/rt/rs/security/jose/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsWriterInterceptor.java
@@ -31,7 +31,7 @@ import org.apache.cxf.common.util.Base64UrlOutputStream;
 import org.apache.cxf.common.util.Base64UrlUtility;
 import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.io.CachedOutputStream;
-import org.apache.cxf.jaxrs.provider.json.JsonMapObjectReaderWriter;
+import org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter;
 import org.apache.cxf.jaxrs.utils.JAXRSUtils;
 import org.apache.cxf.rs.security.jose.common.JoseConstants;
 import org.apache.cxf.rs.security.jose.common.JoseHeaders;

http://git-wip-us.apache.org/repos/asf/cxf/blob/b1c75b11/rt/rs/security/oauth-parent/oauth2/pom.xml
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/pom.xml b/rt/rs/security/oauth-parent/oauth2/pom.xml
index 5c9745b..8b8a594 100644
--- a/rt/rs/security/oauth-parent/oauth2/pom.xml
+++ b/rt/rs/security/oauth-parent/oauth2/pom.xml
@@ -71,6 +71,12 @@
             <scope>test</scope>
         </dependency>
         <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-rs-extension-providers</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency> 
+        <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
             <scope>test</scope>

http://git-wip-us.apache.org/repos/asf/cxf/blob/b1c75b11/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/JoseClientCodeStateManager.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/JoseClientCodeStateManager.java b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/JoseClientCodeStateManager.java
index 4e90693..afc5c96 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/JoseClientCodeStateManager.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/JoseClientCodeStateManager.java
@@ -27,7 +27,7 @@ import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.jaxrs.ext.MessageContext;
 import org.apache.cxf.jaxrs.impl.MetadataMap;
-import org.apache.cxf.jaxrs.provider.json.JsonMapObjectReaderWriter;
+import org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter;
 import org.apache.cxf.rs.security.jose.jwe.JweDecryptionProvider;
 import org.apache.cxf.rs.security.jose.jwe.JweEncryptionProvider;
 import org.apache.cxf.rs.security.jose.jwe.JweUtils;

http://git-wip-us.apache.org/repos/asf/cxf/blob/b1c75b11/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/JwtRequestCodeFilter.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/JwtRequestCodeFilter.java b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/JwtRequestCodeFilter.java
index d80c8bd..371f61c 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/JwtRequestCodeFilter.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/JwtRequestCodeFilter.java
@@ -28,7 +28,7 @@ import javax.ws.rs.core.MultivaluedMap;
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.jaxrs.client.WebClient;
 import org.apache.cxf.jaxrs.impl.MetadataMap;
-import org.apache.cxf.jaxrs.provider.json.JsonMapObjectReaderWriter;
+import org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter;
 import org.apache.cxf.rs.security.jose.jwa.ContentAlgorithm;
 import org.apache.cxf.rs.security.jose.jwa.SignatureAlgorithm;
 import org.apache.cxf.rs.security.jose.jwe.JweDecryptionProvider;

http://git-wip-us.apache.org/repos/asf/cxf/blob/b1c75b11/rt/rs/security/oauth-parent/oauth2/src/test/java/org/apache/cxf/rs/security/oauth2/utils/crypto/CryptoUtilsTest.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/test/java/org/apache/cxf/rs/security/oauth2/utils/crypto/CryptoUtilsTest.java b/rt/rs/security/oauth-parent/oauth2/src/test/java/org/apache/cxf/rs/security/oauth2/utils/crypto/CryptoUtilsTest.java
index d1bb6e6..fd00e06 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/test/java/org/apache/cxf/rs/security/oauth2/utils/crypto/CryptoUtilsTest.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/test/java/org/apache/cxf/rs/security/oauth2/utils/crypto/CryptoUtilsTest.java
@@ -44,6 +44,7 @@ import org.apache.cxf.rs.security.oauth2.tokens.bearer.BearerAccessToken;
 import org.apache.cxf.rs.security.oauth2.tokens.refresh.RefreshToken;
 import org.apache.cxf.rt.security.crypto.CryptoUtils;
 import org.apache.cxf.rt.security.crypto.KeyProperties;
+
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;

http://git-wip-us.apache.org/repos/asf/cxf/blob/b1c75b11/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/common/UserAddress.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/common/UserAddress.java b/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/common/UserAddress.java
index f3953d0..2aa007b 100644
--- a/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/common/UserAddress.java
+++ b/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/common/UserAddress.java
@@ -20,7 +20,7 @@ package org.apache.cxf.rs.security.oidc.common;
 
 import java.util.Map;
 
-import org.apache.cxf.jaxrs.provider.json.JsonMapObject;
+import org.apache.cxf.jaxrs.json.basic.JsonMapObject;
 
 public class UserAddress extends JsonMapObject {
     public static final String STREET = "street_address";

http://git-wip-us.apache.org/repos/asf/cxf/blob/b1c75b11/systests/rs-security/pom.xml
----------------------------------------------------------------------
diff --git a/systests/rs-security/pom.xml b/systests/rs-security/pom.xml
index df0cdd6..cd4db81 100644
--- a/systests/rs-security/pom.xml
+++ b/systests/rs-security/pom.xml
@@ -83,6 +83,11 @@
         </dependency>
         <dependency>
             <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-rs-extension-providers</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-rt-rs-security-sso-saml</artifactId>
             <version>${project.version}</version>
         </dependency>


Mime
View raw message