Skip to content

Commit

Permalink
Boilerplate spec and Jakarta EE 8 related updates (#184)
Browse files Browse the repository at this point in the history
  • Loading branch information
m0mus authored Jul 10, 2019
1 parent d9eff66 commit 89f768a
Show file tree
Hide file tree
Showing 29 changed files with 1,075 additions and 102 deletions.
29 changes: 23 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@
.classpath
.project
.settings/
# Maven noise
target/
*~

# OSX noise
.DS_Store

# IntelliJ Idea noise
.idea
*.iws
*.ipr
*.iml
*nbactions.xml

# Eclipse noise
.settings/
.classpath
.project

# NetBeans noise
nbproject/

# VS Code noise
.vscode/
.idea

# Java noise
*.class
*err_pid*.log
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Contributing to Eclipse Project for JSON Processing
# Contributing to Jakarta JSON Processing

Thanks for your interest in this project.

Expand Down
4 changes: 2 additions & 2 deletions NOTICE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Notices for Eclipse Project for JSON Processing
# Notices for Jakarta JSON Processing

This content is produced and maintained by the Eclipse Project for JSON
Processing project.
Expand All @@ -7,7 +7,7 @@ Processing project.

## Trademarks

Eclipse Project for JSON Processing is a trademark of the Eclipse Foundation.
Jakarta JSON Processing is a trademark of the Eclipse Foundation.

## Copyright

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

# Jakarta JSON Processing (JSON-P)

Jakarta API for JSON Processing provides portable APIs to parse, generate, transform, and query JSON documents. The project is an evolution of [JSR-374](https://jcp.org/en/jsr/detail?id=374) under Jakarta EE umbrella and contains API and a compatible implementation.
Jakarta JSON Processing provides portable APIs to parse, generate, transform, and query JSON documents. This project contains Jakarta JSON Processing specification, API and a compatible implementation.

## Build

Use the following command:
```bash
```bash
mvn -U -C clean install -Dnon.final=true
```

Expand All @@ -18,5 +18,5 @@ mvn -U -C clean install -Dnon.final=true

## Links

- Official [web site](https://eclipse-ee4j.github.io/jsonp/)
- [Eclipse Project](https://projects.eclipse.org/projects/ee4j.jsonp/)
- [JSON-P official web site](https://eclipse-ee4j.github.io/jsonp)
- [Jakarta JSON Processing @ Eclipse](https://projects.eclipse.org/projects/ee4j.jsonp)
8 changes: 4 additions & 4 deletions api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
<artifactId>jakarta.json-api</artifactId>
<packaging>bundle</packaging>
<version>1.2-SNAPSHOT</version>
<name>JSR 374 (JSON Processing) API</name>
<description>API module of JSR 374:Java API for Processing JSON</description>
<url>https://javaee.github.io/jsonp</url>
<name>Jakarta JSON Processing API</name>
<description>Jakarta JSON Processing defines a Java(R) based framework for parsing, generating, transforming, and querying JSON documents.</description>
<url>https://github.com/eclipse-ee4j/jsonp</url>

<properties>
<packages.export>javax.json.*</packages.export>
Expand Down Expand Up @@ -121,7 +121,7 @@
<Implementation-Version>${spec.implementation.version}</Implementation-Version>
<Specification-Version>${spec.specification.version}</Specification-Version>
<Export-Package>${packages.export}</Export-Package>
<Bundle-Description>Java API for JSON Processing (JSON-P) ${spec_version}</Bundle-Description>
<Bundle-Description>Jakarta JSON Processing API ${spec_version}</Bundle-Description>
<Specification-Vendor>Oracle</Specification-Vendor>
</instructions>
</configuration>
Expand Down
88 changes: 44 additions & 44 deletions api/src/main/javadoc/overview.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<html>
<!--
Copyright (c) 2013, 2017 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2013, 2019 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
Expand All @@ -18,7 +18,7 @@
-->

<body>
The Java API for JSON Processing provides portable APIs to parse,
Jakarta JSON Processing provides portable APIs to parse,
generate, transform, and query <a href="http://json.org/">JSON</a> using the
streaming API or the object model API.

Expand All @@ -41,68 +41,68 @@
The object model generates JSON output by navigating the entire tree at once.

<h2>The Streaming API</h2>
<p>The streaming API is similar to the StAX API for XML and consists of the
interfaces {@link javax.json.stream.JsonParser} and
{@link javax.json.stream.JsonGenerator}. {@code JsonParser}
contains methods to parse JSON data using the streaming model.
<p>The streaming API is similar to the StAX API for XML and consists of the
interfaces {@link javax.json.stream.JsonParser} and
{@link javax.json.stream.JsonGenerator}. {@code JsonParser}
contains methods to parse JSON data using the streaming model.
{@code JsonGenerator} contains methods to write JSON data to an ouptut source.

<p>{@code JsonParser} provides forward, read-only access to
JSON data using the pull parsing programming model. In this model the
application code controls the thread and calls methods in the parser interface
to move the parser forward or to obtain JSON data from the current state of
the parser. Refer to
<a href="javax/json/stream/JsonParser.html#JsonParserExample2">this example</a>
for more details.
<p>{@code JsonParser} provides forward, read-only access to
JSON data using the pull parsing programming model. In this model the
application code controls the thread and calls methods in the parser interface
to move the parser forward or to obtain JSON data from the current state of
the parser. Refer to
<a href="javax/json/stream/JsonParser.html#JsonParserExample2">this example</a>
for more details.

<p>{@code JsonGenerator} provides methods to write JSON to a stream. The
<p>{@code JsonGenerator} provides methods to write JSON to a stream. The
generator writes name/value pairs in JSON objects and values in JSON arrays.
Refer to
<a href="javax/json/stream/JsonGenerator.html#JsonGeneratorExample3">this
example</a> for more details.
Refer to
<a href="javax/json/stream/JsonGenerator.html#JsonGeneratorExample3">this
example</a> for more details.

<p>The streaming API is a low-level API designed to process large amounts of
JSON data efficiently. Other JSON frameworks (such as JSON binding) can be
implemented using this API.</p>
<p>The streaming API is a low-level API designed to process large amounts of
JSON data efficiently. Other JSON frameworks (such as JSON binding) can be
implemented using this API.</p>

<h2>The Object Model API</h2>
<p>The object model API is similar to the DOM API for XML. It is a high-level
API that provides immutable object models for JSON object and array structures.
These JSON structures are represented as object models using the Java types
{@link javax.json.JsonObject} and {@link javax.json.JsonArray}.
{@code JsonObject} provides a {@link java.util.Map} view to access the unordered
<p>The object model API is similar to the DOM API for XML. It is a high-level
API that provides immutable object models for JSON object and array structures.
These JSON structures are represented as object models using the Java types
{@link javax.json.JsonObject} and {@link javax.json.JsonArray}.
{@code JsonObject} provides a {@link java.util.Map} view to access the unordered
collection of zero or more name/value pairs from the model. Similarly,
{@code JsonArray} provides a {@link java.util.List} view to access the ordered
sequence of zero or more values from the model.
{@code JsonArray} provides a {@link java.util.List} view to access the ordered
sequence of zero or more values from the model.

<p>The object model API uses builder patterns to create these object models.
<p>The object model API uses builder patterns to create these object models.
Application code can use the interface {@link javax.json.JsonObjectBuilder}
to create models that represent JSON objects. The resulting model is of type
{@code JsonObject}. Refer to
<a href="javax/json/JsonObjectBuilder.html#JsonObjectBuilderExample1">this example</a>
to create models that represent JSON objects. The resulting model is of type
{@code JsonObject}. Refer to
<a href="javax/json/JsonObjectBuilder.html#JsonObjectBuilderExample1">this example</a>
for more details. Application code can use the interface
{@link javax.json.JsonArrayBuilder} to create models that represent JSON arrays.
The resulting model is of type {@code JsonArray}. Refer to
<a href="javax/json/JsonArrayBuilder.html#JsonArrayBuilderExample1">this example</a>
for more details.
{@link javax.json.JsonArrayBuilder} to create models that represent JSON arrays.
The resulting model is of type {@code JsonArray}. Refer to
<a href="javax/json/JsonArrayBuilder.html#JsonArrayBuilderExample1">this example</a>
for more details.

<p>These object models can also be created from an input source (such as
<p>These object models can also be created from an input source (such as
{@link java.io.InputStream} or {@link java.io.Reader}) using the interface
{@link javax.json.JsonReader}.
<a href="javax/json/JsonReader.html#JsonReaderExample1">This example</a> shows
{@link javax.json.JsonReader}.
<a href="javax/json/JsonReader.html#JsonReaderExample1">This example</a> shows
how to read and create an empty {@code JsonArray} model using the interface
{@code JsonReader}. Similarly, these object models can be written to an output
source (such as {@link java.io.OutputStream} or {@link java.io.Writer}) using
the class {@link javax.json.JsonWriter}.
<a href="javax/json/JsonWriter.html#JsonWriterExample1">This example</a> shows
{@code JsonReader}. Similarly, these object models can be written to an output
source (such as {@link java.io.OutputStream} or {@link java.io.Writer}) using
the class {@link javax.json.JsonWriter}.
<a href="javax/json/JsonWriter.html#JsonWriterExample1">This example</a> shows
how to write an empty {@code JsonObject} model using the interface
{@code JsonWriter}.

<h2>JSON Pointer, JSON Patch, and JSON Merge Patch</h2>
The Java API for JSON Processing supports the latest standard on
The Java API for JSON Processing supports the latest standard on
<a href="http://tools.ietf.org/html/rfc6901">JSON Pointer</a>,
<a Href="http://tools.ietf.org/html/rfc6902">JSON Patch</a>, and
<a Href="http://tools.ietf.org/html/rfc7396">JSON Merge Patch</a>.

</body>
</html>
8 changes: 4 additions & 4 deletions bundles/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2013, 2017 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2013, 2019 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -30,9 +30,9 @@
<groupId>org.glassfish</groupId>
<artifactId>json-bundles</artifactId>
<packaging>pom</packaging>
<name>JSR 374 (JSON Processing) bundles</name>
<description>JSON Processing bundles</description>
<url>https://javaee.github.io/jsonp</url>
<name>Jakarta JSON Processing bundles</name>
<description>Jakarta JSON Processing bundles</description>
<url>https://github.com/eclipse-ee4j/jsonp</url>

<modules>
<module>ri</module>
Expand Down
8 changes: 4 additions & 4 deletions bundles/ri/src/main/resources/README.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
* standalone/jakarta.json-${project.version}.jar contains both "JSR 374 : Java API for JSON Processing 1.1" API
* standalone/jakarta.json-${project.version}.jar contains both "Jakarta JSON Processing 1.1" API
and its default provider implementation. Keep it in classpath for both compiling and running your application.
Automatic module name is: 'java.json'

For running on JPMS, following modules are provided:
* mods/jakarta.json-api-${project.version}.jar - 'java.json' module containing only API classes
* mods/jakarta.json-${project.version}-module.jar - 'org.glassfish.java.json' module containing implementation

Integration with JAX-RS: Java API for RESTful Web Services (JAX-RS) is provided through
Integration with Jakarta RESTful Web Services: Jakarta RESTful Web Services is provided through
* jaxrs/jsonp-jaxrs-${project.version}.jar


Expand Down Expand Up @@ -37,15 +37,15 @@ for implementation only:
<version>${project.version}</version>
</dependency>

for JAX-RS integration module:
for Jakarta RESTful Web Services integration module:
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>jsonp-jaxrs</artifactId>
<version>${project.version}</version>
</dependency>


* GlassFish 5.x already bundles latest JSON Processing implementation and JAX-RS integration module.
* GlassFish 5.x already bundles latest Jakarta JSON Processing implementation and Jakarta RESTful Web Services integration module.
If you deploy an application with GlassFish 5.x, your application (war/ear) doesn't have to bundle APIs nor the ri jar.

* Samples can be run from https://github.com/javaee/glassfish-samples
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2017 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2019 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand All @@ -15,7 +15,7 @@
import javax.ws.rs.core.MediaType;

/**
* JsonArray as parameter and return type for a JAX-RS resource
* JsonArray as parameter and return type for a Jakarta RESTful Web Services resource
*
* @author Jitendra Kotamraju
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2017 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2019 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand All @@ -19,7 +19,7 @@
import java.util.Set;

/**
* A JAX-RS Demo Application using JSON API
* A Jakarta RESTful Web Services Demo Application
*
* @author Jitendra Kotamraju
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2017 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2019 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand All @@ -15,7 +15,8 @@
import javax.ws.rs.core.MediaType;

/**
* JsonObject as parameter and return type for a JAX-RS resource
* JsonObject as parameter and return type for a
* Jakarta RESTful Web Services resource
* Writes a person's representation as JSON using JsonObject
*
* @author Jitendra Kotamraju
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2017 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2019 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand All @@ -15,7 +15,8 @@
import javax.ws.rs.core.MediaType;

/**
* JsonStructure as parameter and return type for a JAX-RS resource
* JsonStructure as parameter and return type for a
* Jakarta RESTful Web Services resource
*
* @author Jitendra Kotamraju
*/
Expand Down
10 changes: 5 additions & 5 deletions impl/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2011, 2018 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2011, 2019 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -31,9 +31,9 @@
<artifactId>jakarta.json</artifactId>
<packaging>bundle</packaging>
<version>1.2-SNAPSHOT</version>
<name>JSR 374 (JSON Processing) Default Provider</name>
<description>Default provider for JSR 374:Java API for Processing JSON</description>
<url>https://javaee.github.io/jsonp</url>
<name>JSON-P Default Provider</name>
<description>Default provider for Jakarta JSON Processing</description>
<url>https://github.com/eclipse-ee4j/jsonp</url>

<properties>
<packages.private>org.glassfish.json</packages.private>
Expand Down Expand Up @@ -244,4 +244,4 @@
</build>
</profile>
</profiles>
</project>
</project>
Loading

0 comments on commit 89f768a

Please sign in to comment.