Repository: johnzon Updated Branches: refs/heads/maintenance_1.0.x d344cbcb8 -> 76fe13de8
http://git-wip-us.apache.org/repos/asf/johnzon/blob/76fe13de/jsonb-api/src/main/java/javax/json/bind/JsonbConfig.java ---------------------------------------------------------------------- diff --git a/jsonb-api/src/main/java/javax/json/bind/JsonbConfig.java b/jsonb-api/src/main/java/javax/json/bind/JsonbConfig.java deleted file mode 100644 index 597c88c..0000000 --- a/jsonb-api/src/main/java/javax/json/bind/JsonbConfig.java +++ /dev/null @@ -1,117 +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 javax.json.bind; - -import javax.json.bind.adapter.JsonbAdapter; -import javax.json.bind.config.PropertyNamingStrategy; -import javax.json.bind.config.PropertyVisibilityStrategy; -import javax.json.bind.serializer.JsonbDeserializer; -import javax.json.bind.serializer.JsonbSerializer; -import java.util.Collections; -import java.util.HashMap; -import java.util.Locale; -import java.util.Map; -import java.util.Optional; - -public class JsonbConfig { - private final Map<String, Object> configuration = new HashMap<>(); - - public static final String FORMATTING = "jsonb.formatting"; - public static final String ENCODING = "jsonb.encoding"; - public static final String PROPERTY_NAMING_STRATEGY = "jsonb.property-naming-strategy"; - public static final String PROPERTY_ORDER_STRATEGY = "jsonb.property-order-strategy"; - public static final String NULL_VALUES = "jsonb.null-values"; - public static final String STRICT_IJSON = "jsonb.strict-ijson"; - public static final String PROPERTY_VISIBILITY_STRATEGY = "jsonb.property-visibility-strategy"; - public static final String ADAPTERS = "jsonb.adapters"; - public static final String BINARY_DATA_STRATEGY = "jsonb.binary-data-strategy"; - public static final String DATE_FORMAT = "jsonb.date-format"; - public static final String LOCALE = "jsonb.locale"; - public static final String SERIALIZERS = "jsonb.serializers"; - public static final String DESERIALIZERS = "jsonb.derializers"; - - public final JsonbConfig withDateFormat(final String dateFormat, final Locale locale) { - return setProperty(DATE_FORMAT, dateFormat).setProperty(LOCALE, locale != null ? locale : Locale.getDefault()); - } - - public final JsonbConfig withLocale(final Locale locale) { - return setProperty(LOCALE, locale); - } - - public final JsonbConfig setProperty(final String name, final Object value) { - configuration.put(name, value); - return this; - } - - public final Optional<Object> getProperty(final String name) { - return Optional.ofNullable(configuration.get(name)); - } - - public final Map<String, Object> getAsMap() { - return Collections.unmodifiableMap(configuration); - } - - public final JsonbConfig withFormatting(final Boolean formatted) { - return setProperty(FORMATTING, formatted); - } - - public final JsonbConfig withNullValues(final Boolean serializeNullValues) { - return setProperty(NULL_VALUES, serializeNullValues); - } - - public final JsonbConfig withEncoding(final String encoding) { - return setProperty(ENCODING, encoding); - } - - public final JsonbConfig withStrictIJSON(final Boolean enabled) { - return setProperty(STRICT_IJSON, enabled); - } - - public final JsonbConfig withPropertyNamingStrategy(final PropertyNamingStrategy propertyNamingStrategy) { - return setProperty(PROPERTY_NAMING_STRATEGY, propertyNamingStrategy); - } - - public final JsonbConfig withPropertyNamingStrategy(final String propertyNamingStrategy) { - return setProperty(PROPERTY_NAMING_STRATEGY, propertyNamingStrategy); - } - - public final JsonbConfig withPropertyOrderStrategy(final String propertyOrderStrategy) { - return setProperty(PROPERTY_ORDER_STRATEGY, propertyOrderStrategy); - } - - public final JsonbConfig withPropertyVisibilityStrategy(final PropertyVisibilityStrategy propertyVisibilityStrategy) { - return setProperty(PROPERTY_VISIBILITY_STRATEGY, propertyVisibilityStrategy); - } - - public final JsonbConfig withAdapters(final JsonbAdapter... adapters) { - return setProperty(ADAPTERS, adapters); - } - - public final JsonbConfig withBinaryDataStrategy(final String binaryDataStrategy) { - return setProperty(BINARY_DATA_STRATEGY, binaryDataStrategy); - } - - public final JsonbConfig withSerializers(final JsonbSerializer... serializers) { - return setProperty(SERIALIZERS, serializers); - } - - public final JsonbConfig withDeserializers(final JsonbDeserializer... deserializers) { - return setProperty(DESERIALIZERS, deserializers); - } -} http://git-wip-us.apache.org/repos/asf/johnzon/blob/76fe13de/jsonb-api/src/main/java/javax/json/bind/JsonbException.java ---------------------------------------------------------------------- diff --git a/jsonb-api/src/main/java/javax/json/bind/JsonbException.java b/jsonb-api/src/main/java/javax/json/bind/JsonbException.java deleted file mode 100644 index 6cf0cdd..0000000 --- a/jsonb-api/src/main/java/javax/json/bind/JsonbException.java +++ /dev/null @@ -1,31 +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 javax.json.bind; - -public class JsonbException extends RuntimeException { - private static final long serialVersionUID = 1L; - - public JsonbException(final String message) { - super(message); - } - - public JsonbException(final String message, final Throwable cause) { - super(message, cause); - } -} http://git-wip-us.apache.org/repos/asf/johnzon/blob/76fe13de/jsonb-api/src/main/java/javax/json/bind/adapter/JsonbAdapter.java ---------------------------------------------------------------------- diff --git a/jsonb-api/src/main/java/javax/json/bind/adapter/JsonbAdapter.java b/jsonb-api/src/main/java/javax/json/bind/adapter/JsonbAdapter.java deleted file mode 100644 index bae6ae1..0000000 --- a/jsonb-api/src/main/java/javax/json/bind/adapter/JsonbAdapter.java +++ /dev/null @@ -1,24 +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 javax.json.bind.adapter; - -public interface JsonbAdapter<A, B> { - A adaptToJson(B obj) throws Exception; - B adaptFromJson(A obj) throws Exception; -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/johnzon/blob/76fe13de/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbAnnotation.java ---------------------------------------------------------------------- diff --git a/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbAnnotation.java b/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbAnnotation.java deleted file mode 100644 index 743fd07..0000000 --- a/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbAnnotation.java +++ /dev/null @@ -1,26 +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 javax.json.bind.annotation; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; - -@Retention(RetentionPolicy.RUNTIME) -public @interface JsonbAnnotation { -} http://git-wip-us.apache.org/repos/asf/johnzon/blob/76fe13de/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbCreator.java ---------------------------------------------------------------------- diff --git a/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbCreator.java b/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbCreator.java deleted file mode 100644 index 9502320..0000000 --- a/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbCreator.java +++ /dev/null @@ -1,30 +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 javax.json.bind.annotation; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -@JsonbAnnotation -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.ANNOTATION_TYPE, ElementType.METHOD, ElementType.CONSTRUCTOR}) -public @interface JsonbCreator { -} http://git-wip-us.apache.org/repos/asf/johnzon/blob/76fe13de/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbDateFormat.java ---------------------------------------------------------------------- diff --git a/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbDateFormat.java b/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbDateFormat.java deleted file mode 100644 index 3f7c2ec..0000000 --- a/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbDateFormat.java +++ /dev/null @@ -1,40 +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 javax.json.bind.annotation; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -@JsonbAnnotation -@Retention(RetentionPolicy.RUNTIME) -@Target({ - ElementType.ANNOTATION_TYPE, ElementType.FIELD, - ElementType.METHOD, ElementType.TYPE, - ElementType.PARAMETER, ElementType.PACKAGE -}) -public @interface JsonbDateFormat { - String DEFAULT_LOCALE = "##default"; - String DEFAULT_FORMAT = "##default"; - String TIME_IN_MILLIS = "##time-in-millis"; - - String value() default DEFAULT_FORMAT; - String locale() default DEFAULT_LOCALE; -} http://git-wip-us.apache.org/repos/asf/johnzon/blob/76fe13de/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbNillable.java ---------------------------------------------------------------------- diff --git a/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbNillable.java b/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbNillable.java deleted file mode 100644 index a2a70c6..0000000 --- a/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbNillable.java +++ /dev/null @@ -1,31 +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 javax.json.bind.annotation; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -@JsonbAnnotation -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.ANNOTATION_TYPE, ElementType.TYPE, ElementType.PACKAGE}) -public @interface JsonbNillable { - boolean value() default true; -} http://git-wip-us.apache.org/repos/asf/johnzon/blob/76fe13de/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbNumberFormat.java ---------------------------------------------------------------------- diff --git a/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbNumberFormat.java b/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbNumberFormat.java deleted file mode 100644 index 06bfa9a..0000000 --- a/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbNumberFormat.java +++ /dev/null @@ -1,40 +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 javax.json.bind.annotation; - - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -@JsonbAnnotation -@Retention(RetentionPolicy.RUNTIME) -@Target({ - ElementType.ANNOTATION_TYPE, ElementType.FIELD, - ElementType.METHOD, ElementType.TYPE, ElementType.PARAMETER, - ElementType.PACKAGE -}) -public @interface JsonbNumberFormat { - String DEFAULT_LOCALE = "##default"; - - String value() default ""; - - String locale() default DEFAULT_LOCALE; -} http://git-wip-us.apache.org/repos/asf/johnzon/blob/76fe13de/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbProperty.java ---------------------------------------------------------------------- diff --git a/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbProperty.java b/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbProperty.java deleted file mode 100644 index b8234ba..0000000 --- a/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbProperty.java +++ /dev/null @@ -1,35 +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 javax.json.bind.annotation; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -@JsonbAnnotation -@Retention(RetentionPolicy.RUNTIME) -@Target({ - ElementType.ANNOTATION_TYPE, ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER -}) -public @interface JsonbProperty { - String value() default ""; - - boolean nillable() default false; -} http://git-wip-us.apache.org/repos/asf/johnzon/blob/76fe13de/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbPropertyOrder.java ---------------------------------------------------------------------- diff --git a/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbPropertyOrder.java b/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbPropertyOrder.java deleted file mode 100644 index b06a868..0000000 --- a/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbPropertyOrder.java +++ /dev/null @@ -1,31 +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 javax.json.bind.annotation; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -@JsonbAnnotation -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.ANNOTATION_TYPE, ElementType.TYPE}) -public @interface JsonbPropertyOrder { - String[] value(); -} http://git-wip-us.apache.org/repos/asf/johnzon/blob/76fe13de/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbTransient.java ---------------------------------------------------------------------- diff --git a/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbTransient.java b/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbTransient.java deleted file mode 100644 index 9b708dd..0000000 --- a/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbTransient.java +++ /dev/null @@ -1,32 +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 javax.json.bind.annotation; - - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - - -@JsonbAnnotation -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.ANNOTATION_TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.TYPE}) -public @interface JsonbTransient { -} http://git-wip-us.apache.org/repos/asf/johnzon/blob/76fe13de/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbTypeAdapter.java ---------------------------------------------------------------------- diff --git a/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbTypeAdapter.java b/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbTypeAdapter.java deleted file mode 100644 index 8ceef17..0000000 --- a/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbTypeAdapter.java +++ /dev/null @@ -1,32 +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 javax.json.bind.annotation; - -import javax.json.bind.adapter.JsonbAdapter; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -@JsonbAnnotation -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.ANNOTATION_TYPE, ElementType.TYPE, ElementType.FIELD, ElementType.METHOD}) -public @interface JsonbTypeAdapter { - Class<? extends JsonbAdapter> value(); -} http://git-wip-us.apache.org/repos/asf/johnzon/blob/76fe13de/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbTypeDeserializer.java ---------------------------------------------------------------------- diff --git a/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbTypeDeserializer.java b/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbTypeDeserializer.java deleted file mode 100644 index 0427a3a..0000000 --- a/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbTypeDeserializer.java +++ /dev/null @@ -1,36 +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 javax.json.bind.annotation; - -import javax.json.bind.serializer.JsonbDeserializer; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -import static java.lang.annotation.ElementType.ANNOTATION_TYPE; -import static java.lang.annotation.ElementType.FIELD; -import static java.lang.annotation.ElementType.METHOD; -import static java.lang.annotation.ElementType.TYPE; - -@JsonbAnnotation -@Retention(RetentionPolicy.RUNTIME) -@Target({ANNOTATION_TYPE, TYPE, FIELD, METHOD}) -public @interface JsonbTypeDeserializer { - Class<? extends JsonbDeserializer> value(); -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/johnzon/blob/76fe13de/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbTypeSerializer.java ---------------------------------------------------------------------- diff --git a/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbTypeSerializer.java b/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbTypeSerializer.java deleted file mode 100644 index a0c7980..0000000 --- a/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbTypeSerializer.java +++ /dev/null @@ -1,36 +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 javax.json.bind.annotation; - -import javax.json.bind.serializer.JsonbSerializer; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -import static java.lang.annotation.ElementType.ANNOTATION_TYPE; -import static java.lang.annotation.ElementType.FIELD; -import static java.lang.annotation.ElementType.METHOD; -import static java.lang.annotation.ElementType.TYPE; - -@JsonbAnnotation -@Retention(RetentionPolicy.RUNTIME) -@Target({ANNOTATION_TYPE, TYPE, FIELD, METHOD}) -public @interface JsonbTypeSerializer { - Class<? extends JsonbSerializer> value(); -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/johnzon/blob/76fe13de/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbVisibility.java ---------------------------------------------------------------------- diff --git a/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbVisibility.java b/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbVisibility.java deleted file mode 100644 index 69265f8..0000000 --- a/jsonb-api/src/main/java/javax/json/bind/annotation/JsonbVisibility.java +++ /dev/null @@ -1,34 +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 javax.json.bind.annotation; - -import javax.json.bind.config.PropertyVisibilityStrategy; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -@JsonbAnnotation -@Retention(RetentionPolicy.RUNTIME) -@Target({ - ElementType.ANNOTATION_TYPE, ElementType.TYPE, ElementType.PACKAGE -}) -public @interface JsonbVisibility { - Class<? extends PropertyVisibilityStrategy> value(); -} http://git-wip-us.apache.org/repos/asf/johnzon/blob/76fe13de/jsonb-api/src/main/java/javax/json/bind/config/BinaryDataStrategy.java ---------------------------------------------------------------------- diff --git a/jsonb-api/src/main/java/javax/json/bind/config/BinaryDataStrategy.java b/jsonb-api/src/main/java/javax/json/bind/config/BinaryDataStrategy.java deleted file mode 100644 index 1871826..0000000 --- a/jsonb-api/src/main/java/javax/json/bind/config/BinaryDataStrategy.java +++ /dev/null @@ -1,29 +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 javax.json.bind.config; - -public final class BinaryDataStrategy { - private BinaryDataStrategy() { - // no-op - } - - public static final String BYTE = "BYTE"; - public static final String BASE_64 = "BASE_64"; - public static final String BASE_64_URL = "BASE_64_URL"; -} http://git-wip-us.apache.org/repos/asf/johnzon/blob/76fe13de/jsonb-api/src/main/java/javax/json/bind/config/PropertyNamingStrategy.java ---------------------------------------------------------------------- diff --git a/jsonb-api/src/main/java/javax/json/bind/config/PropertyNamingStrategy.java b/jsonb-api/src/main/java/javax/json/bind/config/PropertyNamingStrategy.java deleted file mode 100644 index 218e087..0000000 --- a/jsonb-api/src/main/java/javax/json/bind/config/PropertyNamingStrategy.java +++ /dev/null @@ -1,30 +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 javax.json.bind.config; - -public interface PropertyNamingStrategy { - String IDENTITY = "IDENTITY"; - String LOWER_CASE_WITH_DASHES = "LOWER_CASE_WITH_DASHES"; - String LOWER_CASE_WITH_UNDERSCORES = "LOWER_CASE_WITH_UNDERSCORES"; - String UPPER_CAMEL_CASE = "UPPER_CAMEL_CASE"; - String UPPER_CAMEL_CASE_WITH_SPACES = "UPPER_CAMEL_CASE_WITH_SPACES"; - String CASE_INSENSITIVE = "CASE_INSENSITIVE"; - - String translateName(String propertyName); -} http://git-wip-us.apache.org/repos/asf/johnzon/blob/76fe13de/jsonb-api/src/main/java/javax/json/bind/config/PropertyOrderStrategy.java ---------------------------------------------------------------------- diff --git a/jsonb-api/src/main/java/javax/json/bind/config/PropertyOrderStrategy.java b/jsonb-api/src/main/java/javax/json/bind/config/PropertyOrderStrategy.java deleted file mode 100644 index 5db8c0e..0000000 --- a/jsonb-api/src/main/java/javax/json/bind/config/PropertyOrderStrategy.java +++ /dev/null @@ -1,29 +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 javax.json.bind.config; - -public final class PropertyOrderStrategy { - private PropertyOrderStrategy() { - // no-op - } - - public static final String LEXICOGRAPHICAL = "LEXICOGRAPHICAL"; - public static final String ANY = "ANY"; - public static final String REVERSE = "REVERSE"; -} http://git-wip-us.apache.org/repos/asf/johnzon/blob/76fe13de/jsonb-api/src/main/java/javax/json/bind/config/PropertyVisibilityStrategy.java ---------------------------------------------------------------------- diff --git a/jsonb-api/src/main/java/javax/json/bind/config/PropertyVisibilityStrategy.java b/jsonb-api/src/main/java/javax/json/bind/config/PropertyVisibilityStrategy.java deleted file mode 100644 index 14f915e..0000000 --- a/jsonb-api/src/main/java/javax/json/bind/config/PropertyVisibilityStrategy.java +++ /dev/null @@ -1,27 +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 javax.json.bind.config; - -import java.lang.reflect.Field; -import java.lang.reflect.Method; - -public interface PropertyVisibilityStrategy { - boolean isVisible(Field field); - boolean isVisible(Method method); -} http://git-wip-us.apache.org/repos/asf/johnzon/blob/76fe13de/jsonb-api/src/main/java/javax/json/bind/serializer/DeserializationContext.java ---------------------------------------------------------------------- diff --git a/jsonb-api/src/main/java/javax/json/bind/serializer/DeserializationContext.java b/jsonb-api/src/main/java/javax/json/bind/serializer/DeserializationContext.java deleted file mode 100644 index 5b6ebae..0000000 --- a/jsonb-api/src/main/java/javax/json/bind/serializer/DeserializationContext.java +++ /dev/null @@ -1,31 +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 javax.json.bind.serializer; - -import javax.json.stream.JsonParser; -import java.lang.reflect.Type; - -public interface DeserializationContext { - /** - * JsonParser cursor is at KEY_NAME event. - */ - <T> T deserialize(Class<T> clazz, JsonParser parser); - - <T> T deserialize(Type type, JsonParser parser); -} http://git-wip-us.apache.org/repos/asf/johnzon/blob/76fe13de/jsonb-api/src/main/java/javax/json/bind/serializer/JsonbDeserializer.java ---------------------------------------------------------------------- diff --git a/jsonb-api/src/main/java/javax/json/bind/serializer/JsonbDeserializer.java b/jsonb-api/src/main/java/javax/json/bind/serializer/JsonbDeserializer.java deleted file mode 100644 index 1f4de04..0000000 --- a/jsonb-api/src/main/java/javax/json/bind/serializer/JsonbDeserializer.java +++ /dev/null @@ -1,30 +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 javax.json.bind.serializer; - -import javax.json.stream.JsonParser; -import java.lang.reflect.Type; - -public interface JsonbDeserializer<T> { - /** - * JsonParser is at START_OBJECT event. - */ - T deserialize(JsonParser parser, DeserializationContext ctx, Type rtType); -} - http://git-wip-us.apache.org/repos/asf/johnzon/blob/76fe13de/jsonb-api/src/main/java/javax/json/bind/serializer/JsonbSerializer.java ---------------------------------------------------------------------- diff --git a/jsonb-api/src/main/java/javax/json/bind/serializer/JsonbSerializer.java b/jsonb-api/src/main/java/javax/json/bind/serializer/JsonbSerializer.java deleted file mode 100644 index 6b487a8..0000000 --- a/jsonb-api/src/main/java/javax/json/bind/serializer/JsonbSerializer.java +++ /dev/null @@ -1,25 +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 javax.json.bind.serializer; - -import javax.json.stream.JsonGenerator; - -public interface JsonbSerializer<T> { - void serialize(T obj, JsonGenerator generator, SerializationContext ctx); -} http://git-wip-us.apache.org/repos/asf/johnzon/blob/76fe13de/jsonb-api/src/main/java/javax/json/bind/serializer/SerializationContext.java ---------------------------------------------------------------------- diff --git a/jsonb-api/src/main/java/javax/json/bind/serializer/SerializationContext.java b/jsonb-api/src/main/java/javax/json/bind/serializer/SerializationContext.java deleted file mode 100644 index aac3b6b..0000000 --- a/jsonb-api/src/main/java/javax/json/bind/serializer/SerializationContext.java +++ /dev/null @@ -1,27 +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 javax.json.bind.serializer; - -import javax.json.stream.JsonGenerator; - -public interface SerializationContext { - <T> void serialize(String key, T object, JsonGenerator generator); - - <T> void serialize(T object, JsonGenerator generator); -} http://git-wip-us.apache.org/repos/asf/johnzon/blob/76fe13de/jsonb-api/src/main/java/javax/json/bind/spi/JsonbProvider.java ---------------------------------------------------------------------- diff --git a/jsonb-api/src/main/java/javax/json/bind/spi/JsonbProvider.java b/jsonb-api/src/main/java/javax/json/bind/spi/JsonbProvider.java deleted file mode 100644 index 8c75a4b..0000000 --- a/jsonb-api/src/main/java/javax/json/bind/spi/JsonbProvider.java +++ /dev/null @@ -1,59 +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 javax.json.bind.spi; - -import javax.json.bind.JsonbBuilder; -import javax.json.bind.JsonbException; -import java.util.Iterator; -import java.util.ServiceLoader; - -public abstract class JsonbProvider { - private static final String DEFAULT_PROVIDER = "org.apache.johnzon.jsonb.JohnzonProvider"; - - public static JsonbProvider provider() { - final Iterator<JsonbProvider> it = ServiceLoader.load(JsonbProvider.class).iterator(); - if (it.hasNext()) { - return it.next(); - } - - try { - return JsonbProvider.class.cast(Thread.currentThread().getContextClassLoader().loadClass(DEFAULT_PROVIDER).newInstance()); - } catch (final ClassNotFoundException cnfe) { - throw new JsonbException(DEFAULT_PROVIDER + " not found", cnfe); - } catch (final Exception x) { - throw new JsonbException(DEFAULT_PROVIDER + " couldn't be instantiated: " + x, x); - } - } - - public static JsonbProvider provider(final String providerFqn) { - if (providerFqn == null) { - throw new IllegalArgumentException(); - } - for (final JsonbProvider provider : ServiceLoader.load(JsonbProvider.class)) { - if (providerFqn.equals(provider.getClass().getName())) { - return provider; - } - } - - final String msg = providerFqn + " not found"; - throw new JsonbException(msg, new ClassNotFoundException(msg)); - } - - public abstract JsonbBuilder create(); -} http://git-wip-us.apache.org/repos/asf/johnzon/blob/76fe13de/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index 2509478..355f0d8 100644 --- a/pom.xml +++ b/pom.xml @@ -40,7 +40,7 @@ <url>http://johnzon.apache.org</url> <properties> - <jsonspecversion>1.0-alpha-1</jsonspecversion> + <geronimo-jsonp.version>1.0-alpha-1</geronimo-jsonp.version> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <johnzon.site.url>https://svn.apache.org/repos/asf/johnzon/site/publish/</johnzon.site.url> <pubsub.url>scm:svn:${johnzon.site.url}</pubsub.url> @@ -67,7 +67,7 @@ <dependency> <groupId>org.apache.geronimo.specs</groupId> <artifactId>geronimo-json_1.0_spec</artifactId> - <version>${jsonspecversion}</version> + <version>${geronimo-jsonp.version}</version> <scope>provided</scope> </dependency> @@ -167,6 +167,7 @@ </dependency> </dependencies> </plugin> + <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> @@ -181,13 +182,13 @@ </execution> </executions> <configuration> - <encoding>UTF-8</encoding> - <consoleOutput>true</consoleOutput> - <failOnViolation>true</failOnViolation> - <includeTestSourceDirectory>true</includeTestSourceDirectory> - <failsOnError>true</failsOnError> - <linkXRef>true</linkXRef> - <logViolationsToConsole>true</logViolationsToConsole> + <encoding>UTF-8</encoding> + <consoleOutput>true</consoleOutput> + <failOnViolation>true</failOnViolation> + <includeTestSourceDirectory>true</includeTestSourceDirectory> + <failsOnError>true</failsOnError> + <linkXRef>true</linkXRef> + <logViolationsToConsole>true</logViolationsToConsole> <checkstyleRules> <module name="Checker"> <module name="SuppressionCommentFilter" /> @@ -310,54 +311,54 @@ <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-release-plugin</artifactId> <configuration> - <tagNameFormat>v@{project.version}</tagNameFormat> - <pushChanges>false</pushChanges> - <localCheckout>true</localCheckout> - <autoVersionSubmodules>true</autoVersionSubmodules> - </configuration> - </plugin> - <plugin> + <tagNameFormat>v@{project.version}</tagNameFormat> + <pushChanges>false</pushChanges> + <localCheckout>true</localCheckout> + <autoVersionSubmodules>true</autoVersionSubmodules> + </configuration> + </plugin> + <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>cobertura-maven-plugin</artifactId> <version>2.6</version> - <configuration> - <instrumentation> - <ignores> - <ignore>org.apache.johnzon.maven.*</ignore> - </ignores> - <excludes> - <exclude>org/apache/johnzon/**/*Mojo*.class</exclude> - <exclude>org/apache/johnzon/**/*Test.class</exclude> - </excludes> - </instrumentation> - <formats> - <format>xml</format> - </formats> - <aggregate>true</aggregate> - </configuration> - </plugin> - <plugin> - <groupId>org.eluder.coveralls</groupId> - <artifactId>coveralls-maven-plugin</artifactId> - <version>3.0.1</version> - <configuration> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.felix</groupId> - <artifactId>maven-bundle-plugin</artifactId> - <version>${felix.plugin.version}</version> - <inherited>true</inherited> - <extensions>true</extensions> - <configuration> - <instructions> - <_removeheaders>Private-Package,Include-Resource,Embed-Dependency,Created-By,Bnd-LastModified,Built-By,Tool</_removeheaders> - <_versionpolicy>${bnd.version.policy}</_versionpolicy> - <Bundle-DocURL>http://johnzon.apache.org/</Bundle-DocURL> - </instructions> - </configuration> - </plugin> - <plugin> + <configuration> + <instrumentation> + <ignores> + <ignore>org.apache.johnzon.maven.*</ignore> + </ignores> + <excludes> + <exclude>org/apache/johnzon/**/*Mojo*.class</exclude> + <exclude>org/apache/johnzon/**/*Test.class</exclude> + </excludes> + </instrumentation> + <formats> + <format>xml</format> + </formats> + <aggregate>true</aggregate> + </configuration> + </plugin> + <plugin> + <groupId>org.eluder.coveralls</groupId> + <artifactId>coveralls-maven-plugin</artifactId> + <version>3.0.1</version> + <configuration> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <version>${felix.plugin.version}</version> + <inherited>true</inherited> + <extensions>true</extensions> + <configuration> + <instructions> + <_removeheaders>Private-Package,Include-Resource,Embed-Dependency,Created-By,Bnd-LastModified,Built-By,Tool</_removeheaders> + <_versionpolicy>${bnd.version.policy}</_versionpolicy> + <Bundle-DocURL>http://johnzon.apache.org/</Bundle-DocURL> + </instructions> + </configuration> + </plugin> + <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> <version>1.4</version> @@ -429,7 +430,7 @@ <artifactId>maven-project-info-reports-plugin</artifactId> <version>2.9</version> <configuration> - <dependencyLocationsEnabled>false</dependencyLocationsEnabled> + <dependencyLocationsEnabled>false</dependencyLocationsEnabled> </configuration> </plugin> <plugin> @@ -460,57 +461,57 @@ <artifactId>maven-surefire-report-plugin</artifactId> <version>2.19.1</version> <configuration> - <argLine>${surefire.jvm.params}</argLine> - <aggregate>true</aggregate> + <argLine>${surefire.jvm.params}</argLine> + <aggregate>true</aggregate> </configuration> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>cobertura-maven-plugin</artifactId> <version>2.6</version> - <configuration> - <instrumentation> - <ignores> - <ignore>org.apache.johnzon.maven.*</ignore> - </ignores> - <excludes> - <exclude>org/apache/johnzon/**/*Mojo*.class</exclude> - <exclude>org/apache/johnzon/**/*Test.class</exclude> - </excludes> - </instrumentation> - <formats> - <format>html</format> - </formats> - <aggregate>true</aggregate> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-checkstyle-plugin</artifactId> - <version>${checkstyle.version}</version> - <reportSets> - <reportSet> - <reports> - <report>checkstyle</report> - </reports> - </reportSet> - </reportSets> - </plugin> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>versions-maven-plugin</artifactId> - <version>2.1</version> - <reportSets> - <reportSet> - <reports> - <report>dependency-updates-report</report> - <report>plugin-updates-report</report> - <report>property-updates-report</report> - </reports> - </reportSet> - </reportSets> - </plugin> - <plugin> + <configuration> + <instrumentation> + <ignores> + <ignore>org.apache.johnzon.maven.*</ignore> + </ignores> + <excludes> + <exclude>org/apache/johnzon/**/*Mojo*.class</exclude> + <exclude>org/apache/johnzon/**/*Test.class</exclude> + </excludes> + </instrumentation> + <formats> + <format>html</format> + </formats> + <aggregate>true</aggregate> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-checkstyle-plugin</artifactId> + <version>${checkstyle.version}</version> + <reportSets> + <reportSet> + <reports> + <report>checkstyle</report> + </reports> + </reportSet> + </reportSets> + </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>versions-maven-plugin</artifactId> + <version>2.1</version> + <reportSets> + <reportSet> + <reports> + <report>dependency-updates-report</report> + <report>plugin-updates-report</report> + <report>property-updates-report</report> + </reports> + </reportSet> + </reportSets> + </plugin> + <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>taglist-maven-plugin</artifactId> <version>2.4</version> @@ -625,12 +626,14 @@ <id>rmannibucau</id> <name>Romain Manni-Bucau</name> <email>rmannibucau AT apache.org</email> + <roles><role>PMC</role></roles> </developer> <developer> <id>jlmonteiro</id> <name>Jean-Louis Monteiro</name> <email>jlmonteiro AT apache.org</email> + <roles><role>PMC</role></roles> </developer> <developer> @@ -638,7 +641,7 @@ <name>Mark Struberg</name> <email>struberg AT apache.org</email> <roles> - <role>Champion</role> + <role>PMC</role> </roles> </developer> @@ -649,9 +652,17 @@ </developer> <developer> + <id>rsandtner</id> + <name>Reinhard Sandtner</name> + <email>rsandtner AT apache.org</email> + <roles><role>PMC</role></roles> + </developer> + + <developer> <id>dblevins</id> <name>David Blevins</name> <email>dblevins AT apache.org</email> + <roles><role>PMC</role></roles> </developer> <developer> @@ -667,13 +678,14 @@ <properties> <picUrl>http://www.gravatar.com/avatar/af23e69dbed585db0ce6445d0adb4985.png</picUrl> </properties> + <roles><role>PMC</role></roles> </developer> </developers> <contributors> <contributor> <name>Thiago Veronezi</name> - </contributor> + </contributor> <contributor> <name>Karl Grosse</name> </contributor> @@ -701,7 +713,6 @@ <jdk>[1.8,)</jdk> </activation> <modules> - <module>jsonb-api</module> <module>johnzon-jsonb</module> </modules> <properties> http://git-wip-us.apache.org/repos/asf/johnzon/blob/76fe13de/src/site/markdown/download.md ---------------------------------------------------------------------- diff --git a/src/site/markdown/download.md b/src/site/markdown/download.md new file mode 100644 index 0000000..0f04f5f --- /dev/null +++ b/src/site/markdown/download.md @@ -0,0 +1,93 @@ +<!--- +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. +--> +# Apache Johnzon Releases + +This page contains download links to the latest Apache Johnzon releases. + +All maven artifacts are available in the Maven.Central repository with the groupId ``org.apache.johnzon``. +The dependencies you can use are listed at the bottom of this page: [Maven Dependencies](#Maven_Dependencies). + + +should be addressed to the [mailing list](http://johnzon.apache.org/mail-lists.html). + +## KEYS for verifying Apache releases + +The GPG keys in the [Johnzon KEYS file](http://www.apache.org/dist/johnzon/KEYS) to validate our releases. +Read more about [how we sign Apache Releases](http://www.apache.org/info/verification.html) + + +---------- + +## Johnzon-1.1.x + +Apache Johnzon 1.1.x implements the JSON-P 1.1 and JSON-B 1.0 specifications which on a level of JavaEE 8. + +#### Binaries +The binary distribution contains all Johnzon modules. + +* [apache-johnzon-1.1.7-bin.zip](https://www.apache.org/dyn/closer.lua/johnzon/johnzon-1.1.7/apache-johnzon-1.1.7-bin.zip) +* [apache-johnzon-1.1.7-bin.zip.sha1](https://www.apache.org/dist/johnzon/johnzon-1.1.7/apache-johnzon-1.1.7-bin.zip.sha1) +* [apache-johnzon-1.1.7-bin.zip.asc](https://www.apache.org/dist/johnzon/johnzon-1.1.7/apache-johnzon-1.1.7-bin.zip.asc) + +#### Source +Should you want to build any of the above binaries, this source bundle is the right one and covers them all. + +* [johnzon-1.1.7-source-release.zip](https://www.apache.org/dyn/closer.lua/johnzon/johnzon-1.1.7/johnzon-1.1.7-source-release.zip) +* [johnzon-1.1.7-source-release.zip.sha1](https://www.apache.org/dist/johnzon/johnzon-1.1.7/johnzon-1.1.7-source-release.zip.sha1) +* [johnzon-1.1.7-source-release.zip.asc](https://www.apache.org/dist/johnzon/johnzon-1.1.7/johnzon-1.1.7-source-release.zip.asc) + + +## Johnzon-1.0.x + +Apache Johnzon 1.0.x implements the JSON-P 1.0 specification and a preliminary version of the JSON-B 1.0. +This corresponds to JavaEE 7 level. + +#### Binaries +The binary distribution contains all Johnzon modules. + +* [apache-johnzon-1.0.0-bin.zip](https://www.apache.org/dyn/closer.lua/johnzon/johnzon-1.0.0/apache-johnzon-1.0.0-bin.zip) +* [apache-johnzon-1.0.0-bin.zip.sha1](https://www.apache.org/dist/johnzon/johnzon-1.0.0/apache-johnzon-1.0.0-bin.zip.sha1) +* [apache-johnzon-1.0.0-bin.zip.asc](https://www.apache.org/dist/johnzon/johnzon-1.0.0/apache-johnzon-1.0.0-bin.zip.asc) + +#### Source +Should you want to build any of the above binaries, this source bundle is the right one and covers them all. + +* [johnzon-1.0.0-source-release.zip](https://www.apache.org/dyn/closer.lua/johnzon/johnzon-1.0.0/johnzon-1.0.0-source-release.zip) +* [johnzon-1.0.0-source-release.zip.sha1](https://www.apache.org/dist/johnzon/johnzon-1.0.0/johnzon-1.0.0-source-release.zip.sha1) +* [johnzon-1.0.0-source-release.zip.asc](https://www.apache.org/dist/johnzon/johnzon-1.0.0/johnzon-1.0.0-source-release.zip.asc) + +------- + +### Maven Dependencies + +#### APIs for Johnzon-1.1.x + + <dependency> + <groupId>org.apache.geronimo.specs</groupId> + <artifactId>geronimo-json_1.1_spec</artifactId> + <version>1.0</version> + </dependency> + + <dependency> + <groupId>org.apache.geronimo.specs</groupId> + <artifactId>geronimo-jsonb_1.0_spec</artifactId> + <version>1.0</version> + </dependency> + +Note that you should set the seope of those dependencies to either `provided` or `compile` depending on whether your environment already provide them or not. http://git-wip-us.apache.org/repos/asf/johnzon/blob/76fe13de/src/site/markdown/index.md ---------------------------------------------------------------------- diff --git a/src/site/markdown/index.md b/src/site/markdown/index.md index ab9e0db..deb746d 100644 --- a/src/site/markdown/index.md +++ b/src/site/markdown/index.md @@ -18,16 +18,13 @@ under the License. --> # Apache Johnzon -Apache Johnzon is a project providing an implementation of JsonProcessing (aka jsr-353) and a set of useful extension -for this specification like an Object mapper, some JAX-RS providers and a WebSocket module provides a basic integration with Java WebSocket API (JSR 356). +Apache Johnzon is a project providing an implementation of JsonProcessing (aka JSR-353) and a set of useful extension +for this specification like an Object mapper, some JAX-RS providers and a WebSocket module provides a basic integration with Java WebSocket API (JSR-356). ## Status Apache Johnzon is a Top Level Project at the Apache Software Foundation (ASF). -It fully implements the JSON-P_1.0 specification (JSR-353). -Johnzon also targets the upcoming JSON-P_1.1 and JSON-B_1.0 specifications. - -The current version is Apache Johnzon 1.0.0. +It fully implements the JSON-P_1.1 (JSR-353) and JSON-B_1.0 (JSR-367) specifications. ## Get started @@ -43,12 +40,13 @@ Johnzon comes with four main modules. </dependency> ]]></pre> -This is the implementation of the specification. You'll surely want to add the API as dependency too: +This is the implementation of the JSON-P 1.1 specification. +You'll surely want to add the API as dependency too: <pre class="prettyprint linenums">< which helped us a lot optimizing memory footprint and speed.  http://git-wip-us.apache.org/repos/asf/johnzon/blob/76fe13de/src/site/site.xml ---------------------------------------------------------------------- diff --git a/src/site/site.xml b/src/site/site.xml index a07de2b..5d5b845 100644 --- a/src/site/site.xml +++ b/src/site/site.xml @@ -72,7 +72,7 @@ <menu name="User Guide"> <item name="Home" href="/index.html"/> - <item name="Download" href="http://www.apache.org/dyn/closer.cgi/johnzon"/> + <item name="Download" href="./download.html"/> <item name="Javadoc" href="/apidocs/index.html"/> <item name="Source Code" href="/source-repository.html"/> <item name="Changelog" href="/changelog.html"/>
