├── .gitignore ├── CONTRIBUTING.md ├── LICENCE.html ├── LICENCE.txt ├── README.md ├── api ├── pom.xml └── src │ └── main │ ├── java │ ├── javax │ │ └── json │ │ │ └── bind │ │ │ ├── Jsonb.java │ │ │ ├── JsonbBuilder.java │ │ │ ├── JsonbConfig.java │ │ │ ├── JsonbException.java │ │ │ ├── adapter │ │ │ ├── JsonbAdapter.java │ │ │ └── package-info.java │ │ │ ├── annotation │ │ │ ├── JsonbAnnotation.java │ │ │ ├── JsonbCreator.java │ │ │ ├── JsonbDateFormat.java │ │ │ ├── JsonbNillable.java │ │ │ ├── JsonbNumberFormat.java │ │ │ ├── JsonbProperty.java │ │ │ ├── JsonbPropertyOrder.java │ │ │ ├── JsonbTransient.java │ │ │ ├── JsonbTypeAdapter.java │ │ │ ├── JsonbTypeDeserializer.java │ │ │ ├── JsonbTypeSerializer.java │ │ │ ├── JsonbVisibility.java │ │ │ └── package-info.java │ │ │ ├── config │ │ │ ├── BinaryDataStrategy.java │ │ │ ├── PropertyNamingStrategy.java │ │ │ ├── PropertyOrderStrategy.java │ │ │ ├── PropertyVisibilityStrategy.java │ │ │ └── package-info.java │ │ │ ├── package-info.java │ │ │ ├── serializer │ │ │ ├── DeserializationContext.java │ │ │ ├── JsonbDeserializer.java │ │ │ ├── JsonbSerializer.java │ │ │ ├── SerializationContext.java │ │ │ └── package-info.java │ │ │ └── spi │ │ │ ├── JsonbProvider.java │ │ │ └── package-info.java │ └── module-info.java │ └── javadoc │ └── doc-files │ └── spec-license.html ├── docs ├── pom.xml └── src │ └── docs │ └── user-guide.adoc ├── etc └── config │ ├── checkstyle.xml │ ├── copyright-exclude │ └── copyright.txt ├── examples ├── pom.xml └── runtime │ ├── nb-configuration.xml │ ├── pom.xml │ └── src │ └── main │ └── java │ ├── com │ └── example │ │ └── jsonb │ │ └── CustomJsonbBuilder.java │ └── examples │ ├── mapping │ ├── CustomMapping.java │ ├── DefaultMapping.java │ ├── DefaultMappingDates.java │ ├── DefaultMappingGenerics.java │ ├── IJsonCompatibility.java │ └── Utils.java │ ├── model │ ├── Author.java │ ├── Book.java │ └── Language.java │ └── runtime │ └── Runtime.java └── spec ├── spec.docx └── spec.pdf /.gitignore: -------------------------------------------------------------------------------- 1 | # maven noise 2 | target 3 | 4 | # osx noise 5 | .DS_Store 6 | profile 7 | 8 | #IntelliJ Idea noise 9 | .idea 10 | *.iws 11 | *.ipr 12 | *.iml 13 | 14 | # TeX build noise 15 | *.aux 16 | *.bbl 17 | *.blg 18 | *.log 19 | *.out 20 | *.tex~ 21 | *.thm 22 | *.toc 23 | /spec/Makefile.fdb_latexmk 24 | /spec/Makefile.fls 25 | /spec/spec.synctex.gz 26 | /spec/spec.xwm 27 | 28 | # eclipse noise 29 | .settings/ 30 | .classpath 31 | .project 32 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | --- 4 | 5 | # Source Code Submissions 6 | We welcome your contributions and look forward to collaborating with you. We can only accept source code repository 7 | submissions from users who have signed and returned the Oracle 8 | Contributor Agreement. You will find details and the agreement to sign at this OTN web page: 9 | [Oracle Contributor Agreement](http://www.oracle.com/technetwork/community/oca-486395.html). 10 | 11 | # Other Contributions 12 | For all project Submissions other than source code repository contributions, the following also applies: Oracle does 13 | not claim ownership of Your Submissions. However, in order to fulfill 14 | the purposes of this project, You must give Oracle and all Users 15 | the right to post, access, discuss, use, publish, disseminate, and refine 16 | Your Submissions. 17 | 18 | In legalese: *You hereby grant to Oracle and all 19 | Users a royalty-free, perpetual, irrevocable, worldwide, non-exclusive, 20 | and fully sub-licensable right and license, under Your intellectual 21 | property rights, to reproduce, modify, adapt, publish, translate, create 22 | derivative works from, distribute, perform, display, and use Your 23 | Submissions (in whole or part) and to incorporate or implement them in 24 | other works in any form, media, or technology now known or later 25 | developed, all subject to the obligation to retain any copyright notices 26 | included in Your Submissions. All Users, Oracle, and their 27 | sublicensees are responsible for any modifications they make to the 28 | Submissions of others.* 29 | 30 | Copyright © 2017 Oracle and/or its affiliates. All rights reserved. 31 | -------------------------------------------------------------------------------- /LICENCE.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/jsonb-spec/dc81f781f490e26ca545f98c50a7319551f724e2/LICENCE.html -------------------------------------------------------------------------------- /LICENCE.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/jsonb-spec/dc81f781f490e26ca545f98c50a7319551f724e2/LICENCE.txt -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Java API for JSON Binding (JSON-B) 2 | 3 | :warning: This project is now part of the EE4J initiative. This repository has been archived as all activities are now happening in the [corresponding Eclipse repository](https://github.com/eclipse-ee4j/jsonb-api). See [here](https://www.eclipse.org/ee4j/status.php) for the overall EE4J transition status. 4 | 5 | ## Links 6 | 7 | - JSON-B community web site: http://json-b.net 8 | - Eclipse Project for JSON-B: https://projects.eclipse.org/projects/ee4j.jsonb 9 | - Discussion groups: jsonb-dev@eclipse.org 10 | - JSR-367 page on JCP site: https://jcp.org/en/jsr/detail?id=367 11 | - Yasson (Reference Implementation): https://github.com/eclipse-ee4j/yasson 12 | -------------------------------------------------------------------------------- /api/src/main/java/javax/json/bind/Jsonb.java: -------------------------------------------------------------------------------- 1 | /* 2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3 | * 4 | * Copyright (c) 2016, 2017 Oracle and/or its affiliates. All rights reserved. 5 | * 6 | * The contents of this file are subject to the terms of either the GNU 7 | * General Public License Version 2 only ("GPL") or the Common Development 8 | * and Distribution License("CDDL") (collectively, the "License"). You 9 | * may not use this file except in compliance with the License. You can 10 | * obtain a copy of the License at 11 | * https://oss.oracle.com/licenses/CDDL+GPL-1.1 12 | * or LICENSE.txt. See the License for the specific 13 | * language governing permissions and limitations under the License. 14 | * 15 | * When distributing the software, include this License Header Notice in each 16 | * file and include the License file at LICENSE.txt. 17 | * 18 | * GPL Classpath Exception: 19 | * Oracle designates this particular file as subject to the "Classpath" 20 | * exception as provided by Oracle in the GPL Version 2 section of the License 21 | * file that accompanied this code. 22 | * 23 | * Modifications: 24 | * If applicable, add the following below the License Header, with the fields 25 | * enclosed by brackets [] replaced by your own identifying information: 26 | * "Portions Copyright [year] [name of copyright owner]" 27 | * 28 | * Contributor(s): 29 | * If you wish your version of this file to be governed by only the CDDL or 30 | * only the GPL Version 2, indicate your decision by adding "[Contributor] 31 | * elects to include this software in this distribution under the [CDDL or GPL 32 | * Version 2] license." If you don't indicate a single choice of license, a 33 | * recipient has the option to distribute your version of this file under 34 | * either the CDDL, the GPL Version 2 or to extend the choice of license to 35 | * its licensees as provided above. However, if you add GPL Version 2 code 36 | * and therefore, elected the GPL Version 2 license, then the option applies 37 | * only if the new code is made subject to such option by the copyright 38 | * holder. 39 | */ 40 | package javax.json.bind; 41 | 42 | import java.io.InputStream; 43 | import java.io.OutputStream; 44 | import java.io.Reader; 45 | import java.io.Writer; 46 | import java.lang.reflect.Type; 47 | 48 | /** 49 | *
{@code Jsonb} provides an abstraction over the JSON Binding framework operations:
50 | * 51 | *Instance of this class is created using {@link javax.json.bind.JsonbBuilder JsonbBuilder} 57 | * builder methods:
58 | *{@code 59 | * // Example 1 - Creating Jsonb using default JsonbBuilder instance provided by default JsonbProvider 60 | * Jsonb jsonb = JsonbBuilder.create(); 61 | * 62 | * // Example 2 - Creating Jsonb instance for a specific provider specified by a class name 63 | * Jsonb jsonb = JsonbBuilder.newBuilder("foo.bar.ProviderImpl).build(); 64 | * 65 | * // Example 3 - Creating Jsonb instance from a custom provider implementation 66 | * Jsonb jsonb = new CustomJsonbBuilder().build(); 67 | * }68 | * 69 | * Deserializing (reading) JSON
71 | * Can de-serialize JSON data that represents either an entire JSON 72 | * document or a subtree of a JSON document. 73 | *74 | *
75 | * Reading (deserializing) object content tree from a File:83 | * 84 | *
76 | *77 | * Jsonb jsonb = JsonbBuilder.create(); 78 | * Book book = jsonb.fromJson(new FileReader("jsonfile.json"), Book.class);79 | * If the deserialization process is unable to deserialize the JSON content to an object 80 | * content tree, fatal error is reported that terminates processing by 81 | * throwing JsonbException. 82 | *
Serializing (writing) to JSON
85 | *86 | * Serialization writes the representation of a Java object content tree into 87 | * JSON data. 88 | *89 | *
90 | * Writing (serializing) object content tree to a File:98 | * 99 | *
91 | *92 | * jsonb.toJson(object, new FileWriter("foo.json"));93 | * Writing (serializing) to a Writer:
94 | *95 | * jsonb.toJson(object, new PrintWriter(System.out)); 96 | *97 | *
Encoding
100 | *101 | * In deserialization operations ({@code fromJson}), encoding of JSON data is detected automatically. 102 | * Use the {@link javax.json.bind.JsonbConfig JsonbConfig} API to configure expected 103 | * input encoding used within deserialization operations. Client applications are 104 | * expected to supply a valid character encoding as defined in the 105 | * RFC 7159 and supported by Java Platform. 106 | * 107 | * In serialization operations ({@code toJson}), UTF-8 encoding is used by default 108 | * for writing JSON data. 109 | * Use the {@link javax.json.bind.JsonbConfig JsonbConfig} API to configure the 110 | * output encoding used within serialization operations. Client applications are 111 | * expected to supply a valid character encoding as defined in the 112 | * RFC 7159 and supported by Java Platform. 113 | *114 | * 115 | *
For optimal use, {@code JsonbBuilder} and {@code Jsonb} instances should be 116 | * reused - for a typical use-case, only one {@code Jsonb} instance is 117 | * required by an application.
118 | * 119 | *All the methods in this class are safe for use by multiple concurrent threads.
120 | * 121 | *Calling {@code Closable.close()} method will cleanup all CDI managed components 122 | * (such as adapters with CDI dependencies) created during interaction with Jsonb. 123 | * Calling {@code close()} must be done after all threads has finished interaction with Jsonb. 124 | * If there are remaining threads working with Jsonb and {@code close()} is called, behaviour is undefined. 125 | *
126 | * 127 | * @see Jsonb 128 | * @see JsonbBuilder 129 | * @see java.util.ServiceLoader 130 | * @since JSON Binding 1.0 131 | */ 132 | public interface Jsonb extends AutoCloseable { 133 | 134 | /** 135 | * Reads in a JSON data from the specified string and return the resulting 136 | * content tree. 137 | * 138 | * @param str 139 | * The string to deserialize JSON data from. 140 | * @param type 141 | * Type of the content tree's root object. 142 | * @paramNote that the detail message associated with 68 | * {@code cause} is not automatically incorporated in 69 | * this runtime exception's detail message. 70 | * 71 | * @param message 72 | * The detail message (which is saved for later retrieval 73 | * by the {@link #getMessage()} method). 74 | * @param cause 75 | * The cause (which is saved for later retrieval by the 76 | * {@link #getCause()} method). (A {@code null} value is 77 | * permitted, and indicates that the cause is nonexistent or 78 | * unknown.) 79 | */ 80 | public JsonbException(final String message, final Throwable cause) { 81 | super(message, cause); 82 | } 83 | 84 | } 85 | 86 | -------------------------------------------------------------------------------- /api/src/main/java/javax/json/bind/adapter/JsonbAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3 | * 4 | * Copyright (c) 2016, 2017 Oracle and/or its affiliates. All rights reserved. 5 | * 6 | * The contents of this file are subject to the terms of either the GNU 7 | * General Public License Version 2 only ("GPL") or the Common Development 8 | * and Distribution License("CDDL") (collectively, the "License"). You 9 | * may not use this file except in compliance with the License. You can 10 | * obtain a copy of the License at 11 | * https://oss.oracle.com/licenses/CDDL+GPL-1.1 12 | * or LICENSE.txt. See the License for the specific 13 | * language governing permissions and limitations under the License. 14 | * 15 | * When distributing the software, include this License Header Notice in each 16 | * file and include the License file at LICENSE.txt. 17 | * 18 | * GPL Classpath Exception: 19 | * Oracle designates this particular file as subject to the "Classpath" 20 | * exception as provided by Oracle in the GPL Version 2 section of the License 21 | * file that accompanied this code. 22 | * 23 | * Modifications: 24 | * If applicable, add the following below the License Header, with the fields 25 | * enclosed by brackets [] replaced by your own identifying information: 26 | * "Portions Copyright [year] [name of copyright owner]" 27 | * 28 | * Contributor(s): 29 | * If you wish your version of this file to be governed by only the CDDL or 30 | * only the GPL Version 2, indicate your decision by adding "[Contributor] 31 | * elects to include this software in this distribution under the [CDDL or GPL 32 | * Version 2] license." If you don't indicate a single choice of license, a 33 | * recipient has the option to distribute your version of this file under 34 | * either the CDDL, the GPL Version 2 or to extend the choice of license to 35 | * its licensees as provided above. However, if you add GPL Version 2 code 36 | * and therefore, elected the GPL Version 2 license, then the option applies 37 | * only if the new code is made subject to such option by the copyright 38 | * holder. 39 | */ 40 | package javax.json.bind.adapter; 41 | 42 | /** 43 | *
Allows to define custom mapping for given java type. The target type could be string or some 44 | * mappable java type.
45 | * 46 | *On serialization "Original" type is converted into "Adapted" type. After that "Adapted" type is serialized to 47 | * JSON the standard way.
48 | * 49 | *On deserialization it works the reverse way: JSON data are deserialized into "Adapted" type which is converted 50 | * to "Original" type after that.
51 | * 52 | *Adapters are registered using {@link javax.json.bind.JsonbConfig#withAdapters(JsonbAdapter[])} method 53 | * or using {@link javax.json.bind.annotation.JsonbTypeAdapter} annotation on class field.
54 | * 55 | * @paramAdapter runtime "Original" and "Adapted" generic types are inferred from subclassing information, 59 | * which is mandatory for adapter to work.
60 | * 61 | *Sample 1:
62 | *63 | * {@code 64 | * // Generic information is provided by subclassing. 65 | * class BoxToCrateAdapter implements JsonbAdapter72 | * 73 | *, Crate > {...}; 66 | * jsonbConfig.withAdapters(new BoxToCrateAdapter()); 67 | * 68 | * // Generic information is provided by subclassing with anonymous class 69 | * jsonbConfig.withAdapters(new JsonbAdapter , Crate > {...}); 70 | * } 71 | *
Sample 2:
74 | *75 | * {@code 76 | * BoxToCrateAdapter85 | * 86 | * @see javax.json.bind.JsonbConfig 87 | * @see javax.json.bind.annotation.JsonbTypeAdapter 88 | * @since JSON Binding 1.0 89 | */ 90 | public interface JsonbAdapterimplements JsonbAdapter , Integer> {...}; 77 | * 78 | * // Bad way: Generic type information is lost due to type erasure 79 | * jsonbConfig.withAdapters(new BoxToCrateAdapter ()); 80 | * 81 | * // Proper way: Anonymous class holds generic type information 82 | * jsonbConfig.withAdapters(new BoxToCrateAdapter (){}); 83 | * } 84 | *
43 | * Defines adapter related classes. 44 | *
45 | * 46 | * @since JSON Binding 1.0 47 | */ 48 | package javax.json.bind.adapter; 49 | -------------------------------------------------------------------------------- /api/src/main/java/javax/json/bind/annotation/JsonbAnnotation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3 | * 4 | * Copyright (c) 2015, 2017 Oracle and/or its affiliates. All rights reserved. 5 | * 6 | * The contents of this file are subject to the terms of either the GNU 7 | * General Public License Version 2 only ("GPL") or the Common Development 8 | * and Distribution License("CDDL") (collectively, the "License"). You 9 | * may not use this file except in compliance with the License. You can 10 | * obtain a copy of the License at 11 | * https://oss.oracle.com/licenses/CDDL+GPL-1.1 12 | * or LICENSE.txt. See the License for the specific 13 | * language governing permissions and limitations under the License. 14 | * 15 | * When distributing the software, include this License Header Notice in each 16 | * file and include the License file at LICENSE.txt. 17 | * 18 | * GPL Classpath Exception: 19 | * Oracle designates this particular file as subject to the "Classpath" 20 | * exception as provided by Oracle in the GPL Version 2 section of the License 21 | * file that accompanied this code. 22 | * 23 | * Modifications: 24 | * If applicable, add the following below the License Header, with the fields 25 | * enclosed by brackets [] replaced by your own identifying information: 26 | * "Portions Copyright [year] [name of copyright owner]" 27 | * 28 | * Contributor(s): 29 | * If you wish your version of this file to be governed by only the CDDL or 30 | * only the GPL Version 2, indicate your decision by adding "[Contributor] 31 | * elects to include this software in this distribution under the [CDDL or GPL 32 | * Version 2] license." If you don't indicate a single choice of license, a 33 | * recipient has the option to distribute your version of this file under 34 | * either the CDDL, the GPL Version 2 or to extend the choice of license to 35 | * its licensees as provided above. However, if you add GPL Version 2 code 36 | * and therefore, elected the GPL Version 2 license, then the option applies 37 | * only if the new code is made subject to such option by the copyright 38 | * holder. 39 | */ 40 | 41 | package javax.json.bind.annotation; 42 | 43 | import java.lang.annotation.Documented; 44 | import java.lang.annotation.Retention; 45 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 46 | 47 | /** 48 | * Marks any relevant JSON Binding annotations. Includes 49 | * {@code @Documented} and {@code @Retention(RUNTIME)} definitions. 50 | * 51 | * @since JSON Binding 1.0 52 | */ 53 | 54 | @Documented 55 | @Retention(RUNTIME) 56 | public @interface JsonbAnnotation { } 57 | -------------------------------------------------------------------------------- /api/src/main/java/javax/json/bind/annotation/JsonbCreator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3 | * 4 | * Copyright (c) 2015, 2017 Oracle and/or its affiliates. All rights reserved. 5 | * 6 | * The contents of this file are subject to the terms of either the GNU 7 | * General Public License Version 2 only ("GPL") or the Common Development 8 | * and Distribution License("CDDL") (collectively, the "License"). You 9 | * may not use this file except in compliance with the License. You can 10 | * obtain a copy of the License at 11 | * https://oss.oracle.com/licenses/CDDL+GPL-1.1 12 | * or LICENSE.txt. See the License for the specific 13 | * language governing permissions and limitations under the License. 14 | * 15 | * When distributing the software, include this License Header Notice in each 16 | * file and include the License file at LICENSE.txt. 17 | * 18 | * GPL Classpath Exception: 19 | * Oracle designates this particular file as subject to the "Classpath" 20 | * exception as provided by Oracle in the GPL Version 2 section of the License 21 | * file that accompanied this code. 22 | * 23 | * Modifications: 24 | * If applicable, add the following below the License Header, with the fields 25 | * enclosed by brackets [] replaced by your own identifying information: 26 | * "Portions Copyright [year] [name of copyright owner]" 27 | * 28 | * Contributor(s): 29 | * If you wish your version of this file to be governed by only the CDDL or 30 | * only the GPL Version 2, indicate your decision by adding "[Contributor] 31 | * elects to include this software in this distribution under the [CDDL or GPL 32 | * Version 2] license." If you don't indicate a single choice of license, a 33 | * recipient has the option to distribute your version of this file under 34 | * either the CDDL, the GPL Version 2 or to extend the choice of license to 35 | * its licensees as provided above. However, if you add GPL Version 2 code 36 | * and therefore, elected the GPL Version 2 license, then the option applies 37 | * only if the new code is made subject to such option by the copyright 38 | * holder. 39 | */ 40 | package javax.json.bind.annotation; 41 | 42 | import java.lang.annotation.ElementType; 43 | import java.lang.annotation.Retention; 44 | import java.lang.annotation.RetentionPolicy; 45 | import java.lang.annotation.Target; 46 | 47 | /** 48 | *This annotation identifies the custom constructor or factory method to use when creating an instance 49 | * of the associated class.
50 | * 51 | *Only one constructor or static factory method can be annotated with {@code JsonbCreator} in a given class.
52 | * 53 | *The {@code @JsonbCreator} annotation is intended to be used with constructors/methods with parameters. 54 | * Such parameters could be annotated for instance with {@code @JsonbProperty}.
55 | * 56 | *Usage
57 | *The {@code @JsonbCreator} annotation can be used with the followingprogram elements:
58 | *Annotation provides way how to set custom date format to field or JavaBean property.
49 | * 50 | *The pattern format is specified in {@link java.time.format.DateTimeFormatter}
51 | * 52 | *Usage
53 | *The {@code @JsonbDateFormat} annotation can be used with the following program elements:
54 | *Specifies how fields having null values are serialized into JSON.
53 | * 54 | *There are two possible values which can be specified. In case of true, fields are serialized as 55 | * key/value pair with value null. In case of false, fields will not be serialized (default behaviour).
56 | * 57 | *Annotation can be specified on type or on package and affects all underlying properties and classes.,
58 | * 59 | *For similar functionality on a property level see {@link JsonbProperty}. 60 | * 61 | * @since JSON Binding 1.0 62 | */ 63 | @JsonbAnnotation 64 | @Retention(RetentionPolicy.RUNTIME) 65 | @Target({ANNOTATION_TYPE, TYPE, PACKAGE}) 66 | public @interface JsonbNillable { 67 | 68 | /** 69 | * Switches on/off serialization of properties with null value. 70 | * 71 | * @return True if field with null value should be serialized as key/value pair into JSON with null value. 72 | */ 73 | boolean value() default true; 74 | } 75 | -------------------------------------------------------------------------------- /api/src/main/java/javax/json/bind/annotation/JsonbNumberFormat.java: -------------------------------------------------------------------------------- 1 | /* 2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3 | * 4 | * Copyright (c) 2016, 2017 Oracle and/or its affiliates. All rights reserved. 5 | * 6 | * The contents of this file are subject to the terms of either the GNU 7 | * General Public License Version 2 only ("GPL") or the Common Development 8 | * and Distribution License("CDDL") (collectively, the "License"). You 9 | * may not use this file except in compliance with the License. You can 10 | * obtain a copy of the License at 11 | * https://oss.oracle.com/licenses/CDDL+GPL-1.1 12 | * or LICENSE.txt. See the License for the specific 13 | * language governing permissions and limitations under the License. 14 | * 15 | * When distributing the software, include this License Header Notice in each 16 | * file and include the License file at LICENSE.txt. 17 | * 18 | * GPL Classpath Exception: 19 | * Oracle designates this particular file as subject to the "Classpath" 20 | * exception as provided by Oracle in the GPL Version 2 section of the License 21 | * file that accompanied this code. 22 | * 23 | * Modifications: 24 | * If applicable, add the following below the License Header, with the fields 25 | * enclosed by brackets [] replaced by your own identifying information: 26 | * "Portions Copyright [year] [name of copyright owner]" 27 | * 28 | * Contributor(s): 29 | * If you wish your version of this file to be governed by only the CDDL or 30 | * only the GPL Version 2, indicate your decision by adding "[Contributor] 31 | * elects to include this software in this distribution under the [CDDL or GPL 32 | * Version 2] license." If you don't indicate a single choice of license, a 33 | * recipient has the option to distribute your version of this file under 34 | * either the CDDL, the GPL Version 2 or to extend the choice of license to 35 | * its licensees as provided above. However, if you add GPL Version 2 code 36 | * and therefore, elected the GPL Version 2 license, then the option applies 37 | * only if the new code is made subject to such option by the copyright 38 | * holder. 39 | */ 40 | package javax.json.bind.annotation; 41 | 42 | import java.lang.annotation.ElementType; 43 | import java.lang.annotation.Retention; 44 | import java.lang.annotation.RetentionPolicy; 45 | import java.lang.annotation.Target; 46 | 47 | /** 48 | *
Annotation provides way how to set custom number format to field or JavaBean property.
49 | * 50 | *The pattern format is specified in {@link java.text.DecimalFormat}
51 | * 52 | *Usage
53 | *The {@code @JsonbNumberFormat} annotation can be used with the following program elements:
54 | *Allows customization of field (or JavaBean property) name.This name is used either in serialization or 50 | * in deserialization.
51 | * 52 | *Usage
53 | *The {@code @JsonbProperty} annotation can be used with the following program elements:
54 | *Specifies order in which properties are serialized.
50 | * 51 | *Partial mapping can also be specified. In that case, properties included 52 | * in annotation declaration will be serialized first (in defined order), followed 53 | * by any properties not included in the definition. The order of properties not 54 | * included in the definition is not guaranteed.
55 | * 56 | * @since JSON Binding 1.0 57 | */ 58 | @JsonbAnnotation 59 | @Retention(RetentionPolicy.RUNTIME) 60 | @Target({ElementType.ANNOTATION_TYPE, ElementType.TYPE}) 61 | public @interface JsonbPropertyOrder { 62 | 63 | /** 64 | * Order in which properties are serialized. Names must correspond to original 65 | * names defined in Java class before any customization applied. 66 | * 67 | * @return Array of property names which defines an order. 68 | */ 69 | String[] value(); 70 | } 71 | -------------------------------------------------------------------------------- /api/src/main/java/javax/json/bind/annotation/JsonbTransient.java: -------------------------------------------------------------------------------- 1 | /* 2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3 | * 4 | * Copyright (c) 2016, 2017 Oracle and/or its affiliates. All rights reserved. 5 | * 6 | * The contents of this file are subject to the terms of either the GNU 7 | * General Public License Version 2 only ("GPL") or the Common Development 8 | * and Distribution License("CDDL") (collectively, the "License"). You 9 | * may not use this file except in compliance with the License. You can 10 | * obtain a copy of the License at 11 | * https://oss.oracle.com/licenses/CDDL+GPL-1.1 12 | * or LICENSE.txt. See the License for the specific 13 | * language governing permissions and limitations under the License. 14 | * 15 | * When distributing the software, include this License Header Notice in each 16 | * file and include the License file at LICENSE.txt. 17 | * 18 | * GPL Classpath Exception: 19 | * Oracle designates this particular file as subject to the "Classpath" 20 | * exception as provided by Oracle in the GPL Version 2 section of the License 21 | * file that accompanied this code. 22 | * 23 | * Modifications: 24 | * If applicable, add the following below the License Header, with the fields 25 | * enclosed by brackets [] replaced by your own identifying information: 26 | * "Portions Copyright [year] [name of copyright owner]" 27 | * 28 | * Contributor(s): 29 | * If you wish your version of this file to be governed by only the CDDL or 30 | * only the GPL Version 2, indicate your decision by adding "[Contributor] 31 | * elects to include this software in this distribution under the [CDDL or GPL 32 | * Version 2] license." If you don't indicate a single choice of license, a 33 | * recipient has the option to distribute your version of this file under 34 | * either the CDDL, the GPL Version 2 or to extend the choice of license to 35 | * its licensees as provided above. However, if you add GPL Version 2 code 36 | * and therefore, elected the GPL Version 2 license, then the option applies 37 | * only if the new code is made subject to such option by the copyright 38 | * holder. 39 | */ 40 | 41 | package javax.json.bind.annotation; 42 | 43 | import java.lang.annotation.Retention; 44 | import java.lang.annotation.RetentionPolicy; 45 | import java.lang.annotation.Target; 46 | 47 | import static java.lang.annotation.ElementType.FIELD; 48 | import static java.lang.annotation.ElementType.METHOD; 49 | import static java.lang.annotation.ElementType.ANNOTATION_TYPE; 50 | 51 | /** 52 | *Prevents mapping of a Java Bean property, field or type to JSON representation.
53 | * 54 | *Usage
55 | *The {@code @JsonbTransient} annotation can be used with the following program elements:
56 | *{@code @JsonbTransient} is mutually exclusive with all other JSON Binding defined annotations.
62 | * 63 | *If a class field is annotated with {@code @JsonbTransient}, exception is thrown when this field, 64 | * getter or setter is annotated with other JSON Binding annotations.
65 | * 66 | *If a getter is annotated with {@code @JsonbTransient}, exception is thrown if when the field 67 | * or this getter are annotated with other JSON Binding annotations. Exception is not thrown 68 | * if JSON Binding annotations are presented on the setter.
69 | * 70 | *If a setter is annotated with {@code @JsonbTransient}, exception is thrown if when the field 71 | * or this setter are annotated with other JSON Binding annotations. Exception is not thrown 72 | * if JSON Binding annotations are presented on the getter.
73 | * 74 | * @since JSON Binding 1.0 75 | */ 76 | @JsonbAnnotation 77 | @Retention(RetentionPolicy.RUNTIME) 78 | @Target({ANNOTATION_TYPE, FIELD, METHOD}) 79 | public @interface JsonbTransient { } 80 | 81 | -------------------------------------------------------------------------------- /api/src/main/java/javax/json/bind/annotation/JsonbTypeAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3 | * 4 | * Copyright (c) 2016, 2017 Oracle and/or its affiliates. All rights reserved. 5 | * 6 | * The contents of this file are subject to the terms of either the GNU 7 | * General Public License Version 2 only ("GPL") or the Common Development 8 | * and Distribution License("CDDL") (collectively, the "License"). You 9 | * may not use this file except in compliance with the License. You can 10 | * obtain a copy of the License at 11 | * https://oss.oracle.com/licenses/CDDL+GPL-1.1 12 | * or LICENSE.txt. See the License for the specific 13 | * language governing permissions and limitations under the License. 14 | * 15 | * When distributing the software, include this License Header Notice in each 16 | * file and include the License file at LICENSE.txt. 17 | * 18 | * GPL Classpath Exception: 19 | * Oracle designates this particular file as subject to the "Classpath" 20 | * exception as provided by Oracle in the GPL Version 2 section of the License 21 | * file that accompanied this code. 22 | * 23 | * Modifications: 24 | * If applicable, add the following below the License Header, with the fields 25 | * enclosed by brackets [] replaced by your own identifying information: 26 | * "Portions Copyright [year] [name of copyright owner]" 27 | * 28 | * Contributor(s): 29 | * If you wish your version of this file to be governed by only the CDDL or 30 | * only the GPL Version 2, indicate your decision by adding "[Contributor] 31 | * elects to include this software in this distribution under the [CDDL or GPL 32 | * Version 2] license." If you don't indicate a single choice of license, a 33 | * recipient has the option to distribute your version of this file under 34 | * either the CDDL, the GPL Version 2 or to extend the choice of license to 35 | * its licensees as provided above. However, if you add GPL Version 2 code 36 | * and therefore, elected the GPL Version 2 license, then the option applies 37 | * only if the new code is made subject to such option by the copyright 38 | * holder. 39 | */ 40 | package javax.json.bind.annotation; 41 | 42 | import javax.json.bind.adapter.JsonbAdapter; 43 | import java.lang.annotation.ElementType; 44 | import java.lang.annotation.Retention; 45 | import java.lang.annotation.RetentionPolicy; 46 | import java.lang.annotation.Target; 47 | 48 | /** 49 | *Annotation provides way how to set custom JsonbAdapter to field or JavaBean property.
50 | * 51 | *Usage
52 | *The {@code @JsonbTypeAdapter} annotation can be used with the following program elements:
53 | *53 | * Annotation provides way how to set custom JsonbDeserializer to field or JavaBean property. 54 | *
55 | * 56 | *Usage
57 | *The {@code @JsonbDeserializer} annotation can be used with the following 58 | * program elements: 59 | *
Annotation provides way how to set custom JsonbSerializer to field or JavaBean property.
53 | * 54 | *Usage
55 | *The {@code @JsonbSerializer} annotation can be used with the following program elements:
56 | *Annotation provides way how to customize visibility strategy of the JSON Binding.
51 | * 52 | *It allows for example to specify, that only public getters and setter should be visible.
53 | * 54 | *Usage
55 | *The {@code @JsonbVisibility} annotation can be used with the following program elements:
56 | *43 | * Defines annotations for customizing the mapping between Java program elements 44 | * and JSON documents. 45 | *
46 | * 47 | * @since JSON Binding 1.0 48 | */ 49 | package javax.json.bind.annotation; 50 | -------------------------------------------------------------------------------- /api/src/main/java/javax/json/bind/config/BinaryDataStrategy.java: -------------------------------------------------------------------------------- 1 | /* 2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3 | * 4 | * Copyright (c) 2015, 2017 Oracle and/or its affiliates. All rights reserved. 5 | * 6 | * The contents of this file are subject to the terms of either the GNU 7 | * General Public License Version 2 only ("GPL") or the Common Development 8 | * and Distribution License("CDDL") (collectively, the "License"). You 9 | * may not use this file except in compliance with the License. You can 10 | * obtain a copy of the License at 11 | * https://oss.oracle.com/licenses/CDDL+GPL-1.1 12 | * or LICENSE.txt. See the License for the specific 13 | * language governing permissions and limitations under the License. 14 | * 15 | * When distributing the software, include this License Header Notice in each 16 | * file and include the License file at LICENSE.txt. 17 | * 18 | * GPL Classpath Exception: 19 | * Oracle designates this particular file as subject to the "Classpath" 20 | * exception as provided by Oracle in the GPL Version 2 section of the License 21 | * file that accompanied this code. 22 | * 23 | * Modifications: 24 | * If applicable, add the following below the License Header, with the fields 25 | * enclosed by brackets [] replaced by your own identifying information: 26 | * "Portions Copyright [year] [name of copyright owner]" 27 | * 28 | * Contributor(s): 29 | * If you wish your version of this file to be governed by only the CDDL or 30 | * only the GPL Version 2, indicate your decision by adding "[Contributor] 31 | * elects to include this software in this distribution under the [CDDL or GPL 32 | * Version 2] license." If you don't indicate a single choice of license, a 33 | * recipient has the option to distribute your version of this file under 34 | * either the CDDL, the GPL Version 2 or to extend the choice of license to 35 | * its licensees as provided above. However, if you add GPL Version 2 code 36 | * and therefore, elected the GPL Version 2 license, then the option applies 37 | * only if the new code is made subject to such option by the copyright 38 | * holder. 39 | */ 40 | 41 | package javax.json.bind.config; 42 | 43 | /** 44 | * Specifies predefined binary data handling strategies. 45 | * This strategy can be set via {@link javax.json.bind.JsonbConfig#withBinaryDataStrategy(String)}. 46 | * 47 | * @see javax.json.bind.JsonbConfig 48 | * @since JSON Binding 1.0 49 | */ 50 | public final class BinaryDataStrategy { 51 | 52 | /** 53 | * Private constructor to disallow instantiation. 54 | */ 55 | private BinaryDataStrategy() { }; 56 | 57 | /** 58 | * Using this strategy, binary data is encoded as a byte array. 59 | * Default encoding strategy. 60 | */ 61 | public static final String BYTE = "BYTE"; 62 | 63 | /** 64 | * Using this strategy, binary data is encoded using 65 | * the Base64 encoding scheme as specified in RFC 4648 and RFC 2045. 66 | */ 67 | public static final String BASE_64 = "BASE_64"; 68 | 69 | /** 70 | * Using this strategy, binary data is encoded using 71 | * the "URL and Filename safe Base64 Alphabet" as specified in Table 2 of RFC 4648. 72 | */ 73 | public static final String BASE_64_URL = "BASE_64_URL"; 74 | } 75 | -------------------------------------------------------------------------------- /api/src/main/java/javax/json/bind/config/PropertyNamingStrategy.java: -------------------------------------------------------------------------------- 1 | /* 2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3 | * 4 | * Copyright (c) 2016, 2017 Oracle and/or its affiliates. All rights reserved. 5 | * 6 | * The contents of this file are subject to the terms of either the GNU 7 | * General Public License Version 2 only ("GPL") or the Common Development 8 | * and Distribution License("CDDL") (collectively, the "License"). You 9 | * may not use this file except in compliance with the License. You can 10 | * obtain a copy of the License at 11 | * https://oss.oracle.com/licenses/CDDL+GPL-1.1 12 | * or LICENSE.txt. See the License for the specific 13 | * language governing permissions and limitations under the License. 14 | * 15 | * When distributing the software, include this License Header Notice in each 16 | * file and include the License file at LICENSE.txt. 17 | * 18 | * GPL Classpath Exception: 19 | * Oracle designates this particular file as subject to the "Classpath" 20 | * exception as provided by Oracle in the GPL Version 2 section of the License 21 | * file that accompanied this code. 22 | * 23 | * Modifications: 24 | * If applicable, add the following below the License Header, with the fields 25 | * enclosed by brackets [] replaced by your own identifying information: 26 | * "Portions Copyright [year] [name of copyright owner]" 27 | * 28 | * Contributor(s): 29 | * If you wish your version of this file to be governed by only the CDDL or 30 | * only the GPL Version 2, indicate your decision by adding "[Contributor] 31 | * elects to include this software in this distribution under the [CDDL or GPL 32 | * Version 2] license." If you don't indicate a single choice of license, a 33 | * recipient has the option to distribute your version of this file under 34 | * either the CDDL, the GPL Version 2 or to extend the choice of license to 35 | * its licensees as provided above. However, if you add GPL Version 2 code 36 | * and therefore, elected the GPL Version 2 license, then the option applies 37 | * only if the new code is made subject to such option by the copyright 38 | * holder. 39 | */ 40 | 41 | package javax.json.bind.config; 42 | 43 | /** 44 | *Allows to define custom property naming strategy. 45 | * Specifies predefined property naming strategies. 46 | * Does not override JsonbProperty value.
47 | * 48 | *This strategy can be set via {@link javax.json.bind.JsonbConfig}.
49 | * 50 | * @see javax.json.bind.JsonbConfig 51 | * @since JSON Binding 1.0 52 | */ 53 | public interface PropertyNamingStrategy { 54 | /** 55 | * Using this strategy, the property name is unchanged. 56 | */ 57 | String IDENTITY = "IDENTITY"; 58 | 59 | /** 60 | * Using this strategy, the property name is transformed to lower case with dashes. 61 | * The dashes are on the positions of different case boundaries in the original field name (camel case). 62 | */ 63 | String LOWER_CASE_WITH_DASHES = "LOWER_CASE_WITH_DASHES"; 64 | 65 | /** 66 | * Using this strategy, the property name is transformed to lower case with underscores. 67 | * The underscores are on the positions of different case boundaries in the original field name (camel case). 68 | */ 69 | String LOWER_CASE_WITH_UNDERSCORES = "LOWER_CASE_WITH_UNDERSCORES"; 70 | 71 | /** 72 | * Using this strategy, the first character will be capitalized. 73 | */ 74 | String UPPER_CAMEL_CASE = "UPPER_CAMEL_CASE"; 75 | 76 | /** 77 | * Using this strategy, the first character will be capitalized and the words 78 | * will be separated by spaces. 79 | */ 80 | String UPPER_CAMEL_CASE_WITH_SPACES = "UPPER_CAMEL_CASE_WITH_SPACES"; 81 | 82 | /** 83 | * Using this strategy, the serialization will be same as identity. 84 | * Deserialization will be case insensitive. E.g. property in JSON with name 85 | * PropertyNAME, will be mapped to field propertyName. 86 | */ 87 | String CASE_INSENSITIVE = "CASE_INSENSITIVE"; 88 | 89 | /** 90 | * Translates the property name into its JSON field name representation. 91 | * 92 | * @param propertyName Name of the property to translate. 93 | * @return Translated JSON field name. 94 | */ 95 | String translateName(String propertyName); 96 | } 97 | -------------------------------------------------------------------------------- /api/src/main/java/javax/json/bind/config/PropertyOrderStrategy.java: -------------------------------------------------------------------------------- 1 | /* 2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3 | * 4 | * Copyright (c) 2015, 2017 Oracle and/or its affiliates. All rights reserved. 5 | * 6 | * The contents of this file are subject to the terms of either the GNU 7 | * General Public License Version 2 only ("GPL") or the Common Development 8 | * and Distribution License("CDDL") (collectively, the "License"). You 9 | * may not use this file except in compliance with the License. You can 10 | * obtain a copy of the License at 11 | * https://oss.oracle.com/licenses/CDDL+GPL-1.1 12 | * or LICENSE.txt. See the License for the specific 13 | * language governing permissions and limitations under the License. 14 | * 15 | * When distributing the software, include this License Header Notice in each 16 | * file and include the License file at LICENSE.txt. 17 | * 18 | * GPL Classpath Exception: 19 | * Oracle designates this particular file as subject to the "Classpath" 20 | * exception as provided by Oracle in the GPL Version 2 section of the License 21 | * file that accompanied this code. 22 | * 23 | * Modifications: 24 | * If applicable, add the following below the License Header, with the fields 25 | * enclosed by brackets [] replaced by your own identifying information: 26 | * "Portions Copyright [year] [name of copyright owner]" 27 | * 28 | * Contributor(s): 29 | * If you wish your version of this file to be governed by only the CDDL or 30 | * only the GPL Version 2, indicate your decision by adding "[Contributor] 31 | * elects to include this software in this distribution under the [CDDL or GPL 32 | * Version 2] license." If you don't indicate a single choice of license, a 33 | * recipient has the option to distribute your version of this file under 34 | * either the CDDL, the GPL Version 2 or to extend the choice of license to 35 | * its licensees as provided above. However, if you add GPL Version 2 code 36 | * and therefore, elected the GPL Version 2 license, then the option applies 37 | * only if the new code is made subject to such option by the copyright 38 | * holder. 39 | */ 40 | 41 | package javax.json.bind.config; 42 | 43 | /** 44 | * Specifies predefined property order strategies. 45 | * This strategy can be set via {@link javax.json.bind.JsonbConfig#withPropertyOrderStrategy(String)} 46 | * 47 | * @see javax.json.bind.JsonbConfig 48 | * @since JSON Binding 1.0 49 | */ 50 | public final class PropertyOrderStrategy { 51 | 52 | /** 53 | * Private constructor to disallow instantiation. 54 | */ 55 | private PropertyOrderStrategy() { }; 56 | 57 | /** 58 | * Using this strategy, the order of properties is lexicographical. 59 | */ 60 | public static final String LEXICOGRAPHICAL = "LEXICOGRAPHICAL"; 61 | 62 | /** 63 | * Using this strategy, the order of properties 64 | * is not guaranteed to retain any order. 65 | */ 66 | public static final String ANY = "ANY"; 67 | 68 | /** 69 | * Using this strategy, the order of properties is in reverse order 70 | * to lexicographical order. 71 | */ 72 | public static final String REVERSE = "REVERSE"; 73 | } 74 | -------------------------------------------------------------------------------- /api/src/main/java/javax/json/bind/config/PropertyVisibilityStrategy.java: -------------------------------------------------------------------------------- 1 | /* 2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3 | * 4 | * Copyright (c) 2015, 2017 Oracle and/or its affiliates. All rights reserved. 5 | * 6 | * The contents of this file are subject to the terms of either the GNU 7 | * General Public License Version 2 only ("GPL") or the Common Development 8 | * and Distribution License("CDDL") (collectively, the "License"). You 9 | * may not use this file except in compliance with the License. You can 10 | * obtain a copy of the License at 11 | * https://oss.oracle.com/licenses/CDDL+GPL-1.1 12 | * or LICENSE.txt. See the License for the specific 13 | * language governing permissions and limitations under the License. 14 | * 15 | * When distributing the software, include this License Header Notice in each 16 | * file and include the License file at LICENSE.txt. 17 | * 18 | * GPL Classpath Exception: 19 | * Oracle designates this particular file as subject to the "Classpath" 20 | * exception as provided by Oracle in the GPL Version 2 section of the License 21 | * file that accompanied this code. 22 | * 23 | * Modifications: 24 | * If applicable, add the following below the License Header, with the fields 25 | * enclosed by brackets [] replaced by your own identifying information: 26 | * "Portions Copyright [year] [name of copyright owner]" 27 | * 28 | * Contributor(s): 29 | * If you wish your version of this file to be governed by only the CDDL or 30 | * only the GPL Version 2, indicate your decision by adding "[Contributor] 31 | * elects to include this software in this distribution under the [CDDL or GPL 32 | * Version 2] license." If you don't indicate a single choice of license, a 33 | * recipient has the option to distribute your version of this file under 34 | * either the CDDL, the GPL Version 2 or to extend the choice of license to 35 | * its licensees as provided above. However, if you add GPL Version 2 code 36 | * and therefore, elected the GPL Version 2 license, then the option applies 37 | * only if the new code is made subject to such option by the copyright 38 | * holder. 39 | */ 40 | 41 | package javax.json.bind.config; 42 | 43 | import java.lang.reflect.Field; 44 | import java.lang.reflect.Method; 45 | 46 | /** 47 | *Provides mechanism how to define customized property visibility strategy.
48 | * 49 | *This strategy can be set via {@link javax.json.bind.JsonbConfig}.
50 | * 51 | * @see javax.json.bind.JsonbConfig 52 | * @since JSON Binding 1.0 53 | */ 54 | public interface PropertyVisibilityStrategy { 55 | 56 | /** 57 | * Responds whether the given field should be considered 58 | * as the JsonbProperty. 59 | * 60 | * @param field member of the class 61 | * @return true if member should be visible 62 | */ 63 | boolean isVisible(Field field); 64 | 65 | /** 66 | * Responds whether the given method should be considered 67 | * as the JsonbProperty. 68 | * 69 | * @param method member of the class 70 | * @return true if member should be visible 71 | */ 72 | boolean isVisible(Method method); 73 | } 74 | -------------------------------------------------------------------------------- /api/src/main/java/javax/json/bind/config/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3 | * 4 | * Copyright (c) 2015, 2017 Oracle and/or its affiliates. All rights reserved. 5 | * 6 | * The contents of this file are subject to the terms of either the GNU 7 | * General Public License Version 2 only ("GPL") or the Common Development 8 | * and Distribution License("CDDL") (collectively, the "License"). You 9 | * may not use this file except in compliance with the License. You can 10 | * obtain a copy of the License at 11 | * https://oss.oracle.com/licenses/CDDL+GPL-1.1 12 | * or LICENSE.txt. See the License for the specific 13 | * language governing permissions and limitations under the License. 14 | * 15 | * When distributing the software, include this License Header Notice in each 16 | * file and include the License file at LICENSE.txt. 17 | * 18 | * GPL Classpath Exception: 19 | * Oracle designates this particular file as subject to the "Classpath" 20 | * exception as provided by Oracle in the GPL Version 2 section of the License 21 | * file that accompanied this code. 22 | * 23 | * Modifications: 24 | * If applicable, add the following below the License Header, with the fields 25 | * enclosed by brackets [] replaced by your own identifying information: 26 | * "Portions Copyright [year] [name of copyright owner]" 27 | * 28 | * Contributor(s): 29 | * If you wish your version of this file to be governed by only the CDDL or 30 | * only the GPL Version 2, indicate your decision by adding "[Contributor] 31 | * elects to include this software in this distribution under the [CDDL or GPL 32 | * Version 2] license." If you don't indicate a single choice of license, a 33 | * recipient has the option to distribute your version of this file under 34 | * either the CDDL, the GPL Version 2 or to extend the choice of license to 35 | * its licensees as provided above. However, if you add GPL Version 2 code 36 | * and therefore, elected the GPL Version 2 license, then the option applies 37 | * only if the new code is made subject to such option by the copyright 38 | * holder. 39 | */ 40 | 41 | /** 42 | *43 | * Defines strategies and policies for customizing the mapping between Java program elements 44 | * and JSON documents. 45 | *
46 | * 47 | * @since JSON Binding 1.0 48 | */ 49 | package javax.json.bind.config; 50 | -------------------------------------------------------------------------------- /api/src/main/java/javax/json/bind/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3 | * 4 | * Copyright (c) 2015, 2017 Oracle and/or its affiliates. All rights reserved. 5 | * 6 | * The contents of this file are subject to the terms of either the GNU 7 | * General Public License Version 2 only ("GPL") or the Common Development 8 | * and Distribution License("CDDL") (collectively, the "License"). You 9 | * may not use this file except in compliance with the License. You can 10 | * obtain a copy of the License at 11 | * https://oss.oracle.com/licenses/CDDL+GPL-1.1 12 | * or LICENSE.txt. See the License for the specific 13 | * language governing permissions and limitations under the License. 14 | * 15 | * When distributing the software, include this License Header Notice in each 16 | * file and include the License file at LICENSE.txt. 17 | * 18 | * GPL Classpath Exception: 19 | * Oracle designates this particular file as subject to the "Classpath" 20 | * exception as provided by Oracle in the GPL Version 2 section of the License 21 | * file that accompanied this code. 22 | * 23 | * Modifications: 24 | * If applicable, add the following below the License Header, with the fields 25 | * enclosed by brackets [] replaced by your own identifying information: 26 | * "Portions Copyright [year] [name of copyright owner]" 27 | * 28 | * Contributor(s): 29 | * If you wish your version of this file to be governed by only the CDDL or 30 | * only the GPL Version 2, indicate your decision by adding "[Contributor] 31 | * elects to include this software in this distribution under the [CDDL or GPL 32 | * Version 2] license." If you don't indicate a single choice of license, a 33 | * recipient has the option to distribute your version of this file under 34 | * either the CDDL, the GPL Version 2 or to extend the choice of license to 35 | * its licensees as provided above. However, if you add GPL Version 2 code 36 | * and therefore, elected the GPL Version 2 license, then the option applies 37 | * only if the new code is made subject to such option by the copyright 38 | * holder. 39 | */ 40 | 41 | /** 42 | * Provides JSON Binding API, which enables binding Java objects from and to 43 | * JSON documents. 44 | * 45 | * Main user entry points to the API is {@link javax.json.bind.JsonbBuilder JsonbBuilder} 46 | * which builds {@link javax.json.bind.Jsonb Jsonb} instances. 47 | * 48 | * @since JSON Binding 1.0 49 | */ 50 | package javax.json.bind; 51 | -------------------------------------------------------------------------------- /api/src/main/java/javax/json/bind/serializer/DeserializationContext.java: -------------------------------------------------------------------------------- 1 | /* 2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3 | * 4 | * Copyright (c) 2016, 2017 Oracle and/or its affiliates. All rights reserved. 5 | * 6 | * The contents of this file are subject to the terms of either the GNU 7 | * General Public License Version 2 only ("GPL") or the Common Development 8 | * and Distribution License("CDDL") (collectively, the "License"). You 9 | * may not use this file except in compliance with the License. You can 10 | * obtain a copy of the License at 11 | * https://oss.oracle.com/licenses/CDDL+GPL-1.1 12 | * or LICENSE.txt. See the License for the specific 13 | * language governing permissions and limitations under the License. 14 | * 15 | * When distributing the software, include this License Header Notice in each 16 | * file and include the License file at LICENSE.txt. 17 | * 18 | * GPL Classpath Exception: 19 | * Oracle designates this particular file as subject to the "Classpath" 20 | * exception as provided by Oracle in the GPL Version 2 section of the License 21 | * file that accompanied this code. 22 | * 23 | * Modifications: 24 | * If applicable, add the following below the License Header, with the fields 25 | * enclosed by brackets [] replaced by your own identifying information: 26 | * "Portions Copyright [year] [name of copyright owner]" 27 | * 28 | * Contributor(s): 29 | * If you wish your version of this file to be governed by only the CDDL or 30 | * only the GPL Version 2, indicate your decision by adding "[Contributor] 31 | * elects to include this software in this distribution under the [CDDL or GPL 32 | * Version 2] license." If you don't indicate a single choice of license, a 33 | * recipient has the option to distribute your version of this file under 34 | * either the CDDL, the GPL Version 2 or to extend the choice of license to 35 | * its licensees as provided above. However, if you add GPL Version 2 code 36 | * and therefore, elected the GPL Version 2 license, then the option applies 37 | * only if the new code is made subject to such option by the copyright 38 | * holder. 39 | */ 40 | 41 | package javax.json.bind.serializer; 42 | 43 | 44 | import javax.json.stream.JsonParser; 45 | import java.lang.reflect.Type; 46 | 47 | /** 48 | * Provides JSONB Mapper functionality on top of JSONP parser. 49 | * 50 | * @see JsonbDeserializer 51 | * @since JSON Binding 1.0 52 | */ 53 | public interface DeserializationContext { 54 | 55 | /** 56 | *57 | * Deserialize JSON stream into instance of provided class using {@link javax.json.stream.JsonParser}. 58 | * JsonParser cursor have to be at KEY_NAME before START_OBJECT / START_ARRAY, or at START_OBJECT / START_ARRAY 59 | * to call this method. After deserialization is complete JsonParser will be at END_OBJECT / END_ARRAY 60 | * for deserialized JSON structure. 61 | *
62 | * 63 | *64 | * If method is called for the same type, which is deserializer bound to, deserializer recursion is suppressed. 65 | * Otherwise deserializers are reentrant during deserialization process started by this method. 66 | *
67 | * 68 | * {@link JsonParser} instance of JSONB runtime is shared with custom deserializer. 69 | * 70 | * @param clazz 71 | * Type to deserialize into. No arg constructor required. 72 | * @param parser 73 | * JSONP parser to drive. 74 | * @param82 | * Deserialize JSON stream into instance of provided class using {@link javax.json.stream.JsonParser}. 83 | * JsonParser cursor have to be at KEY_NAME before START_OBJECT / START_ARRAY, or at START_OBJECT / START_ARRAY 84 | * to call this method. After deserialization is complete JsonParser will be at END_OBJECT / END_ARRAY 85 | * for deserialized JSON structure. 86 | *
87 | * 88 | *89 | * If method is called for the same type, which is deserializer bound to, deserializer recursion is suppressed. 90 | * Otherwise deserializers are reentrant during deserialization process started by this method. 91 | *
92 | * 93 | * {@link JsonParser} instance of JSONB runtime is shared with custom deserializer. 94 | * 95 | * @param type 96 | * Type to deserialize into. No arg constructor required. 97 | * @param parser 98 | * JSONP parser to drive. 99 | * @paramInterface representing a custom deserializer for a given type. It provides a low-level API for java object 48 | * deserialization from JSON stream using {@link JsonParser}. Unlike {@link javax.json.bind.adapter.JsonbAdapter}, 49 | * which acts more as converter from one java type to another, deserializer provides more fine grained control over 50 | * deserialization process.
51 | * 52 | *{@link DeserializationContext} acts as JSONB runtime, able to deserialize any java object provided.
53 | * 54 | *Sample of custom Deserializer:
55 | *56 | * class Box { 57 | * public BoxInner boxInnerObject; 58 | * public String name; 59 | * } 60 | * 61 | * BoxDeserializer implements JsonbDeserializer<Box> { 62 | * public Box deserialize(JsonParser parser, DeserializationContext ctx, Type rtType) { 63 | * Box = new Box(); 64 | * 65 | * while (parser.hasNext()) { 66 | * Event event = parser.next(); 67 | * 68 | * if (event == JsonParser.Event.KEY_NAME && parser.getString().equals("boxInnerObject") { 69 | * // Deserialize inner object 70 | * box.boxInnerObject = ctx.deserialize(BoxInner.class, jsonParser); 71 | * 72 | * } else if (event == JsonParser.Event.KEY_NAME && parser.getString().equals("name") { 73 | * // Deserialize name property 74 | * parser.next(); // move to VALUE 75 | * box.name = parser.getString(); 76 | * } 77 | * } 78 | * 79 | * return box; 80 | * } 81 | * } 82 | *83 | * 84 | *
Deserializers are registered using {@link javax.json.bind.JsonbConfig#withDeserializers(JsonbDeserializer[])} 85 | * method or using {@link javax.json.bind.annotation.JsonbTypeDeserializer} annotation on type.
86 | * 87 | * @paramInterface representing a custom serializer for given type. Unlike {@link javax.json.bind.adapter.JsonbAdapter} 47 | * serializer provides more fine grained control over serialization process by writing java object directly into 48 | * JSON stream using {@link JsonGenerator}. {@link SerializationContext} acts as JSONB runtime, able to serialize 49 | * any java object provided.
50 | * 51 | *Serializers are registered using {@link javax.json.bind.JsonbConfig#withSerializers(JsonbSerializer[])} 52 | * method or using {@link javax.json.bind.annotation.JsonbTypeSerializer} annotation on type
53 | * 54 | *Sample of custom Serializer:
55 | *56 | * class Box { 57 | * public BoxInner boxInnerObject; 58 | * public String name; 59 | * } 60 | * 61 | * class BoxSerializer implements JsonbSerializer<Box> { 62 | * public void serialize(Box box, JsonGenerator generator, SerializationContext ctx) { 63 | * generator.write("name", box.name); 64 | * ctx.serialize("boxInnerObject", generator); 65 | * } 66 | * } 67 | *68 | * 69 | * @param
43 | * Defines serializer depending classes. 44 | *
45 | * @since JSON Binding 1.0 46 | */ 47 | package javax.json.bind.serializer; 48 | -------------------------------------------------------------------------------- /api/src/main/java/javax/json/bind/spi/JsonbProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3 | * 4 | * Copyright (c) 2016, 2017 Oracle and/or its affiliates. All rights reserved. 5 | * 6 | * The contents of this file are subject to the terms of either the GNU 7 | * General Public License Version 2 only ("GPL") or the Common Development 8 | * and Distribution License("CDDL") (collectively, the "License"). You 9 | * may not use this file except in compliance with the License. You can 10 | * obtain a copy of the License at 11 | * https://oss.oracle.com/licenses/CDDL+GPL-1.1 12 | * or LICENSE.txt. See the License for the specific 13 | * language governing permissions and limitations under the License. 14 | * 15 | * When distributing the software, include this License Header Notice in each 16 | * file and include the License file at LICENSE.txt. 17 | * 18 | * GPL Classpath Exception: 19 | * Oracle designates this particular file as subject to the "Classpath" 20 | * exception as provided by Oracle in the GPL Version 2 section of the License 21 | * file that accompanied this code. 22 | * 23 | * Modifications: 24 | * If applicable, add the following below the License Header, with the fields 25 | * enclosed by brackets [] replaced by your own identifying information: 26 | * "Portions Copyright [year] [name of copyright owner]" 27 | * 28 | * Contributor(s): 29 | * If you wish your version of this file to be governed by only the CDDL or 30 | * only the GPL Version 2, indicate your decision by adding "[Contributor] 31 | * elects to include this software in this distribution under the [CDDL or GPL 32 | * Version 2] license." If you don't indicate a single choice of license, a 33 | * recipient has the option to distribute your version of this file under 34 | * either the CDDL, the GPL Version 2 or to extend the choice of license to 35 | * its licensees as provided above. However, if you add GPL Version 2 code 36 | * and therefore, elected the GPL Version 2 license, then the option applies 37 | * only if the new code is made subject to such option by the copyright 38 | * holder. 39 | */ 40 | 41 | package javax.json.bind.spi; 42 | 43 | import javax.json.bind.JsonbBuilder; 44 | import javax.json.bind.JsonbException; 45 | import java.util.Iterator; 46 | import java.util.ServiceLoader; 47 | 48 | /** 49 | * Service provider for JSON Binding implementations. 50 | * 51 | * Provider implementors must implement all abstract methods. 52 | * 53 | * API clients can obtain instance of default provider by calling: 54 | *55 | * {@code 56 | * JsonbProvider provider = JsonbProvider.provider(); 57 | * }}58 | * 59 | * Specific provider instance lookup: 60 | *
61 | * {@code 62 | * JsonbProvider provider; 63 | * try { 64 | * JsonbProvider.provider("foo.bar.ProviderImpl"); 65 | * } catch (JsonbException e) { 66 | * // provider not found or could not be instantiated 67 | * }}68 | * where '{@code foo.bar.ProviderImpl}' is a vendor implementation class extending 69 | * {@link javax.json.bind.spi.JsonbProvider} and identified to service loader as 70 | * specified in {@link java.util.ServiceLoader} documentation. 71 | *
{@link javax.json.bind.spi.JsonbProvider JsonbProvider} is an abstract class 46 | * that provides a service for creating JSON Binding builder implementation instances. 47 | * A service provider for {@link javax.json.bind.spi.JsonbProvider JsonbProvider} provides an 48 | * specific implementation by subclassing and implementing the 49 | * {@link javax.json.bind.JsonbBuilder JsonbBuilder} creation 50 | * method(s) in {@link javax.json.bind.spi.JsonbProvider JsonbProvider}. 51 | * 52 | *
The API locates and loads providers using {@link java.util.ServiceLoader ServiceLoader}. 53 | * 54 | * @since JSON Binding 1.0 55 | */ 56 | package javax.json.bind.spi; 57 | -------------------------------------------------------------------------------- /api/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3 | * 4 | * Copyright (c) 2017 Oracle and/or its affiliates. All rights reserved. 5 | * 6 | * The contents of this file are subject to the terms of either the GNU 7 | * General Public License Version 2 only ("GPL") or the Common Development 8 | * and Distribution License("CDDL") (collectively, the "License"). You 9 | * may not use this file except in compliance with the License. You can 10 | * obtain a copy of the License at 11 | * https://oss.oracle.com/licenses/CDDL+GPL-1.1 12 | * or LICENSE.txt. See the License for the specific 13 | * language governing permissions and limitations under the License. 14 | * 15 | * When distributing the software, include this License Header Notice in each 16 | * file and include the License file at LICENSE.txt. 17 | * 18 | * GPL Classpath Exception: 19 | * Oracle designates this particular file as subject to the "Classpath" 20 | * exception as provided by Oracle in the GPL Version 2 section of the License 21 | * file that accompanied this code. 22 | * 23 | * Modifications: 24 | * If applicable, add the following below the License Header, with the fields 25 | * enclosed by brackets [] replaced by your own identifying information: 26 | * "Portions Copyright [year] [name of copyright owner]" 27 | * 28 | * Contributor(s): 29 | * If you wish your version of this file to be governed by only the CDDL or 30 | * only the GPL Version 2, indicate your decision by adding "[Contributor] 31 | * elects to include this software in this distribution under the [CDDL or GPL 32 | * Version 2] license." If you don't indicate a single choice of license, a 33 | * recipient has the option to distribute your version of this file under 34 | * either the CDDL, the GPL Version 2 or to extend the choice of license to 35 | * its licensees as provided above. However, if you add GPL Version 2 code 36 | * and therefore, elected the GPL Version 2 license, then the option applies 37 | * only if the new code is made subject to such option by the copyright 38 | * holder. 39 | */ 40 | 41 | 42 | module java.json.bind { 43 | exports javax.json.bind; 44 | exports javax.json.bind.adapter; 45 | exports javax.json.bind.annotation; 46 | exports javax.json.bind.config; 47 | exports javax.json.bind.serializer; 48 | exports javax.json.bind.spi; 49 | 50 | requires java.json; 51 | requires java.logging; 52 | 53 | uses javax.json.bind.spi.JsonbProvider; 54 | } -------------------------------------------------------------------------------- /api/src/main/javadoc/doc-files/spec-license.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 |11 | ORACLE AMERICA, INC. IS WILLING TO LICENSE THIS SPECIFICATION TO YOU ONLY UPON THE CONDITION THAT YOU ACCEPT ALL OF THE TERMS CONTAINED IN THIS LICENSE AGREEMENT ("AGREEMENT"). PLEASE READ THE TERMS AND CONDITIONS OF THIS AGREEMENT CAREFULLY. BY DOWNLOADING THIS SPECIFICATION, YOU ACCEPT THE TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU ARE NOT WILLING TO BE BOUND BY THEM, SELECT THE "DECLINE" BUTTON AT THE BOTTOM OF THIS PAGE AND THE DOWNLOADING PROCESS WILL NOT CONTINUE. 12 |
13 |
14 | Specification: JSR-367 Java API for JSON Binding
15 | ("Specification")
16 | Version: 1.0
17 | Status: Final Release
18 | Release: June 2017
19 | Copyright 2017 Oracle America, Inc.
20 | 500 Oracle Parkway, Redwood City, California 94065, U.S.A
21 | All rights reserved.
23 | NOTICE 24 |
25 |26 | The Specification is protected by copyright and the information described therein may be protected by one or more U.S. patents, foreign patents, or pending applications. Except as provided under the following license, no part of the Specification may be reproduced in any form by any means without the prior written authorization of Oracle America, Inc. ("Oracle") and its licensors, if any. Any use of the Specification and the information described therein will be governed by the terms and conditions of this Agreement. 27 |
28 | Subject to the terms and conditions of this license, including your compliance with Paragraphs 1 and 2 below, Oracle hereby grants you a fully-paid, non-exclusive, non-transferable, limited license (without the right to sublicense) under Oracle's intellectual property rights to:
29 | 1.Review the Specification for the purposes of evaluation. This includes: (i) developing implementations of the Specification for your internal, non-commercial use; (ii) discussing the Specification with any third party; and (iii) excerpting brief portions of the Specification in oral or written communications which discuss the Specification provided that such excerpts do not in the aggregate constitute a significant portion of the Technology.
30 |
31 | 2.Distribute implementations of the Specification to third parties for their testing and evaluation use, provided that any such implementation:
32 | (i) does not modify, subset, superset or otherwise extend the Licensor Name Space, or include any public or protected packages, classes, Java interfaces, fields or methods within the Licensor Name Space other than those required/authorized by the Specification or Specifications being implemented;
33 | (ii) is clearly and prominently marked with the word "UNTESTED" or "EARLY ACCESS" or "INCOMPATIBLE" or "UNSTABLE" or "BETA" in any list of available builds and in proximity to every link initiating its download, where the list or link is under Licensee's control; and
34 | (iii) includes the following notice: "This is an implementation of an early-draft specification developed under the Java Community Process (JCP) and is made available for testing and evaluation purposes only. The code is not compatible with any specification of the JCP."
35 | 36 | The grant set forth above concerning your distribution of implementations of the specification is 37 | contingent upon your agreement to terminate development and distribution of your "early draft" 38 | implementation as soon as feasible following final completion of the specification. If you fail to do so, 39 | the foregoing grant shall be considered null and void.
40 | 41 | No provision of this Agreement shall be understood to restrict your ability to make and distribute to 42 | third parties applications written to the Specification.
43 | 44 | Other than this limited license, you acquire no right, title or interest in or to the Specification or any 45 | other Oracle intellectual property, and the Specification may only be used in accordance with the license 46 | terms set forth herein. This license will expire on the earlier of: (a) two (2) years from the date of 47 | Release listed above; (b) the date on which the final version of the Specification is publicly released; or 48 | (c) the date on which the Java Specification Request (JSR) to which the Specification corresponds is 49 | withdrawn. In addition, this license will terminate immediately without notice from Oracle if you fail to 50 | comply with any provision of this license. Upon termination, you must cease use of or destroy the 51 | Specification.
52 | 53 | "Licensor Name Space" means the public class or interface declarations whose names begin with "java", 54 | "javax", "com.oracle" or their equivalents in any subsequent naming convention adopted by Oracle 55 | through the Java Community Process, or any recognized successors or replacements thereof
56 |
57 | TRADEMARKS
58 |
59 | No right, title, or interest in or to any trademarks, service marks, or trade names of Oracle or Oracle's
60 | licensors is granted hereunder. Oracle, the Oracle logo, and Java are trademarks or registered
61 | trademarks of Oracle America, Inc. in the U.S. and other countries.
62 |
63 | DISCLAIMER OF WARRANTIES
64 | THE SPECIFICATION IS PROVIDED "AS IS" AND IS EXPERIMENTAL AND MAY CONTAIN DEFECTS OR
65 | DEFICIENCIES WHICH CANNOT OR WILL NOT BE CORRECTED BY ORACLE. ORACLE MAKES NO
66 | REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO,
67 | WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT
68 | THAT THE CONTENTS OF THE SPECIFICATION ARE SUITABLE FOR ANY PURPOSE OR THAT ANY PRACTICE
69 | OR IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY PATENTS,
70 | COPYRIGHTS, TRADE SECRETS OR OTHER RIGHTS. This document does not represent any commitment to
71 | release or implement any portion of the Specification in any product.
72 | 73 | THE SPECIFICATION COULD INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS. CHANGES 74 | ARE PERIODICALLY ADDED TO THE INFORMATION THEREIN; THESE CHANGES WILL BE INCORPORATED 75 | INTO NEW VERSIONS OF THE SPECIFICATION, IF ANY. ORACLE MAY MAKE IMPROVEMENTS AND/OR 76 | CHANGES TO THE PRODUCT(S) AND/OR THE PROGRAM(S) DESCRIBED IN THE SPECIFICATION AT ANY 77 | TIME. Any use of such changes in the Specification will be governed by the then-current license for the 78 | applicable version of the Specification.
79 |
80 | LIMITATION OF LIABILITY
81 | TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT WILL ORACLE OR ITS LICENSORS BE LIABLE FOR
82 | ANY DAMAGES, INCLUDING WITHOUT LIMITATION, LOST REVENUE, PROFITS OR DATA, OR FOR SPECIAL,
83 | INDIRECT, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS
84 | OF THE THEORY OF LIABILITY, ARISING OUT OF OR RELATED TO ANY FURNISHING, PRACTICING,
85 | MODIFYING OR ANY USE OF THE SPECIFICATION, EVEN IF ORACLE AND/OR ITS LICENSORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
86 | 87 | You will hold Oracle (and its licensors) harmless from any claims based on your use of the Specification for any purposes other than the limited right of evaluation as described above, and from any claims that later versions or releases of any Specification furnished to you are incompatible with the Specification provided to you under this license.
88 |
89 | RESTRICTED RIGHTS LEGEND
90 | If this Software is being acquired by or on behalf of the U.S. Government or by a U.S. Government prime contractor or subcontractor (at any tier), then the Government's rights in the Software and accompanying documentation shall be only as set forth in this license; this is in accordance with 48 C.F.R. 227.7201 through 227.7202-4 (for Department of Defense (DoD) acquisitions) and with 48 C.F.R. 2.101 and 12.212 (for non-DoD acquisitions).
91 | REPORT
92 | You may wish to report any ambiguities, inconsistencies or inaccuracies you may find in connection with your evaluation of the Specification ("Feedback"). To the extent that you provide Oracle with any Feedback, you hereby: (i) agree that such Feedback is provided on a non-proprietary and non-confidential basis, and (ii) grant Oracle a perpetual, non-exclusive, worldwide, fully paid-up, irrevocable license, with the right to sublicense through multiple levels of sublicensees, to incorporate, disclose, and use without limitation the Feedback for any purpose related to the Specification and future versions, implementations, and test suites thereof.
93 |
94 | GENERAL TERMS
95 | Any action related to this Agreement will be governed by California law and controlling U.S. federal law. The U.N. Convention for the International Sale of Goods and the choice of law rules of any jurisdiction will not apply. The Specification is subject to U.S. export control laws and may be subject to export or import regulations in other countries. Licensee agrees to comply strictly with all such laws and regulations and acknowledges that it has the responsibility to obtain such licenses to export, re-export or import as may be required after delivery to Licensee.
96 |
97 | This Agreement is the parties' entire agreement relating to its subject matter. It supersedes all prior or contemporaneous oral or written communications, proposals, conditions, representations and warranties and prevails over any conflicting or additional terms of any quote, order, acknowledgment, or other communication between the parties relating to its subject matter during the term of this Agreement. No modification to this Agreement will be binding, unless in writing and signed by an authorized representative of each party.
98 |
99 |
100 |
101 |
--------------------------------------------------------------------------------
/docs/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
43 |