CINXE.COM

Apache Johnzon -

<!DOCTYPE html> <!-- | Generated by Apache Maven Doxia at 2014-11-13 | Rendered using Apache Maven Fluido Skin 1.3.0 --> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="Date-Revision-yyyymmdd" content="20141113" /> <meta http-equiv="Content-Language" content="en" /> <title>Apache Johnzon - </title> <link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" /> <link rel="stylesheet" href="./css/site.css" /> <link rel="stylesheet" href="./css/print.css" media="print" /> <script type="text/javascript" src="./js/apache-maven-fluido-1.3.0.min.js"></script> </head> <body class="topBarEnabled"> <div id="topbar" class="navbar navbar-fixed-top "> <div class="navbar-inner"> <div class="container-fluid"> <a data-target=".nav-collapse" data-toggle="collapse" class="btn btn-navbar"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </a> <ul class="nav"> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">User Guide <b class="caret"></b></a> <ul class="dropdown-menu"> <li> <a href="index.html" title="Home">Home</a> </li> </ul> </li> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">Project Documentation <b class="caret"></b></a> <ul class="dropdown-menu"> <li class="dropdown-submenu"> <a href="project-info.html" title="Project Information">Project Information</a> <ul class="dropdown-menu"> <li> <a href="index.html" title="About">About</a> </li> <li> <a href="plugin-management.html" title="Plugin Management">Plugin Management</a> </li> <li> <a href="distribution-management.html" title="Distribution Management">Distribution Management</a> </li> <li> <a href="dependency-info.html" title="Dependency Information">Dependency Information</a> </li> <li> <a href="dependency-convergence.html" title="Dependency Convergence">Dependency Convergence</a> </li> <li> <a href="source-repository.html" title="Source Repository">Source Repository</a> </li> <li> <a href="mail-lists.html" title="Mailing Lists">Mailing Lists</a> </li> <li> <a href="issue-tracking.html" title="Issue Tracking">Issue Tracking</a> </li> <li> <a href="integration.html" title="Continuous Integration">Continuous Integration</a> </li> <li> <a href="plugins.html" title="Project Plugins">Project Plugins</a> </li> <li> <a href="license.html" title="Project License">Project License</a> </li> <li> <a href="modules.html" title="Project Modules">Project Modules</a> </li> <li> <a href="team-list.html" title="Project Team">Project Team</a> </li> <li> <a href="project-summary.html" title="Project Summary">Project Summary</a> </li> <li> <a href="dependencies.html" title="Dependencies">Dependencies</a> </li> </ul> </li> <li class="dropdown-submenu"> <a href="project-reports.html" title="Project Reports">Project Reports</a> <ul class="dropdown-menu"> <li> <a href="apidocs/index.html" title="JavaDocs">JavaDocs</a> </li> <li> <a href="surefire-report.html" title="Surefire Report">Surefire Report</a> </li> <li> <a href="cobertura/index.html" title="Cobertura Test Coverage">Cobertura Test Coverage</a> </li> <li> <a href="checkstyle.html" title="Checkstyle">Checkstyle</a> </li> <li> <a href="dependency-updates-report.html" title="Dependency Updates Report">Dependency Updates Report</a> </li> <li> <a href="plugin-updates-report.html" title="Plugin Updates Report">Plugin Updates Report</a> </li> <li> <a href="property-updates-report.html" title="Property Updates Report">Property Updates Report</a> </li> <li> <a href="taglist.html" title="Tag List">Tag List</a> </li> <li> <a href="changelog.html" title="Change Log">Change Log</a> </li> <li> <a href="file-activity.html" title="File Activity">File Activity</a> </li> <li> <a href="dev-activity.html" title="Developer Activity">Developer Activity</a> </li> <li> <a href="jira-report.html" title="JIRA Report">JIRA Report</a> </li> </ul> </li> </ul> </li> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">ASF <b class="caret"></b></a> <ul class="dropdown-menu"> <li> <a href="http://www.apache.org/foundation/how-it-works.html" title="How Apache Works">How Apache Works</a> </li> <li> <a href="http://www.apache.org/foundation/" title="Foundation">Foundation</a> </li> <li> <a href="http://www.apache.org/foundation/sponsorship.html" title="Sponsoring Apache">Sponsoring Apache</a> </li> <li> <a href="http://www.apache.org/foundation/thanks.html" title="Thanks">Thanks</a> </li> </ul> </li> </ul> </div> </div> </div> </div> <div class="container-fluid"> <div id="banner"> <div class="pull-left"> <a href="index.html" id="bannerLeft" title="Apache Johnzon logo"> <h2>Apache Johnzon</h2> </a> </div> <div class="pull-right"> <a href="../../" id="bannerRight"> <img src="../../images/egg-logo.png" /> </a> </div> <div class="clear"><hr/></div> </div> <div id="breadcrumbs"> <ul class="breadcrumb"> <li id="publishDate">Last Published: 2014-11-13</li> <li class="divider">|</li> <li id="projectVersion">Version: 0.2-incubating</li> </ul> </div> <div class="row-fluid"> <div id="leftColumn" class="span3"> <div class="well sidebar-nav"> <ul class="nav nav-list"> <li class="nav-header">User Guide</li> <li class="active"> <a href="#"><i class="none"></i>Home</a> </li> <li class="nav-header">Project Documentation</li> <li> <a href="project-info.html" title="Project Information"> <i class="icon-chevron-down"></i> Project Information</a> <ul class="nav nav-list"> <li class="active"> <a href="#"><i class="none"></i>About</a> </li> <li> <a href="plugin-management.html" title="Plugin Management"> <i class="none"></i> Plugin Management</a> </li> <li> <a href="distribution-management.html" title="Distribution Management"> <i class="none"></i> Distribution Management</a> </li> <li> <a href="dependency-info.html" title="Dependency Information"> <i class="none"></i> Dependency Information</a> </li> <li> <a href="dependency-convergence.html" title="Dependency Convergence"> <i class="none"></i> Dependency Convergence</a> </li> <li> <a href="source-repository.html" title="Source Repository"> <i class="none"></i> Source Repository</a> </li> <li> <a href="mail-lists.html" title="Mailing Lists"> <i class="none"></i> Mailing Lists</a> </li> <li> <a href="issue-tracking.html" title="Issue Tracking"> <i class="none"></i> Issue Tracking</a> </li> <li> <a href="integration.html" title="Continuous Integration"> <i class="none"></i> Continuous Integration</a> </li> <li> <a href="plugins.html" title="Project Plugins"> <i class="none"></i> Project Plugins</a> </li> <li> <a href="license.html" title="Project License"> <i class="none"></i> Project License</a> </li> <li> <a href="modules.html" title="Project Modules"> <i class="none"></i> Project Modules</a> </li> <li> <a href="team-list.html" title="Project Team"> <i class="none"></i> Project Team</a> </li> <li> <a href="project-summary.html" title="Project Summary"> <i class="none"></i> Project Summary</a> </li> <li> <a href="dependencies.html" title="Dependencies"> <i class="none"></i> Dependencies</a> </li> </ul> </li> <li> <a href="project-reports.html" title="Project Reports"> <i class="icon-chevron-right"></i> Project Reports</a> </li> <li class="nav-header">ASF</li> <li> <a href="http://www.apache.org/foundation/how-it-works.html" class="externalLink" title="How Apache Works"> <i class="none"></i> How Apache Works</a> </li> <li> <a href="http://www.apache.org/foundation/" class="externalLink" title="Foundation"> <i class="none"></i> Foundation</a> </li> <li> <a href="http://www.apache.org/foundation/sponsorship.html" class="externalLink" title="Sponsoring Apache"> <i class="none"></i> Sponsoring Apache</a> </li> <li> <a href="http://www.apache.org/foundation/thanks.html" class="externalLink" title="Thanks"> <i class="none"></i> Thanks</a> </li> </ul> <hr class="divider" /> <div id="poweredBy"> <div class="clear"></div> <div class="clear"></div> <div class="clear"></div> <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"> <img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /> </a> </div> </div> </div> <div id="bodyColumn" class="span9" > <!-- - Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --><h1>Apache johnzon</h1> <p>Apache Johnzon is a project providing an implementation of JsonProcessing (aka jsr-353) and a set of useful extension for this specification like an Object mapper and some JAX-RS providers.</p> <div class="section"> <h2>Get started<a name="Get_started"></a></h2> <p>Johnzon comes with three main modules.</p> <div class="section"> <h3>Core<a name="Core"></a></h3> <div> <pre class="prettyprint linenums"> &lt;dependency&gt; &lt;groupId&gt;org.apache.johnzon&lt;/groupId&gt; &lt;artifactId&gt;johnzon-core&lt;/artifactId&gt; &lt;version&gt;${johnzon.version}&lt;/version&gt; &lt;/dependency&gt; </pre></div> <p>This is the implementation of the specification. You&#x2019;ll surely want to add the API as dependency too:</p> <div> <pre class="prettyprint linenums"> &lt;dependency&gt; &lt;groupId&gt;org.apache.geronimo.specs&lt;/groupId&gt; &lt;artifactId&gt;geronimo-json_1.0_spec&lt;/artifactId&gt; &lt;version&gt;${json-processing.version}&lt;/version&gt; &lt;scope&gt;provided&lt;/scope&gt; &lt;!-- or compile if your environment doesn't provide it --&gt; &lt;/dependency&gt; </pre></div></div> <div class="section"> <h3>Mapper<a name="Mapper"></a></h3> <div> <pre class="prettyprint linenums"> &lt;dependency&gt; &lt;groupId&gt;org.apache.johnzon&lt;/groupId&gt; &lt;artifactId&gt;johnzon-mapper&lt;/artifactId&gt; &lt;version&gt;${johnzon.version}&lt;/version&gt; &lt;/dependency&gt; </pre></div> <p>The mapper module allows you to use the implementation you want of Json Processing specification to map Json to Object and the opposite.</p> <div> <pre class="prettyprint linenums"> final MySuperObject object = createObject(); final Mapper mapper = new MapperBuilder().build(); mapper.writeObject(object, outputStream); final MySuperObject otherObject = mapper.readObject(inputStream, MySuperObject.class); </pre></div></div> <div class="section"> <h3>JAX-RS<a name="JAX-RS"></a></h3> <div> <pre class="prettyprint linenums"> &lt;dependency&gt; &lt;groupId&gt;org.apache.johnzon&lt;/groupId&gt; &lt;artifactId&gt;johnzon-jaxrs&lt;/artifactId&gt; &lt;version&gt;${johnzon.version}&lt;/version&gt; &lt;/dependency&gt; </pre></div> <p>JAX-RS module provides two providers (and underlying MessageBodyReaders and MessageBodyWriters):</p> <ul> <li>org.apache.johnzon.jaxrs.JohnzonProvider: use Johnzon Mapper to map Object to Json and the opposite</li> <li>org.apache.johnzon.jaxrs.ConfigurableJohnzonProvider: same as JohnzonProvider but with setters to ease the configuration of the provider in most servers/containers</li> <li>org.apache.johnzon.jaxrs.JsrProvider: allows you to use JsrArray, JsrObject (more generally JsonStructure)</li> </ul></div></div> <div class="section"> <h2>Thanks<a name="Thanks"></a></h2> <p>We would like to thank ej-technologies for their <a class="externalLink" href="http://www.ej-technologies.com/products/jprofiler/overview.html">Java profiler JProfiler</a> which helped us a lot optimizing memory footprint and speed. <img src="http://www.ej-technologies.com/images/banners/jprofiler_small.png" alt="JProfiler" /></p></div> </div> </div> </div> <hr/> <footer> <div class="container-fluid"> <div class="row span12">Copyright &copy; 2014 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved. </div> <?xml version="1.0" encoding="UTF-8"?> <div class="row span16"> <div>Apache Johnzon, Apache, the Apache feather logo, and the Apache Johnzon project logos are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.</div> <a href="http://incubator.apache.org/projects/johnzon.html/privacy-policy.html">Privacy Policy</a> </div> <div id="ohloh" class="pull-right"> <script type="text/javascript" src="http://www.ohloh.net/p/apache-johnzon/widgets/project_basic_stats.js"></script> </div> </div> </footer> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10