blob: 124d9af3ee885e6e40aeb3629838e999736d4acd [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_252) on Fri Jul 16 09:39:04 UTC 2021 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>MOXyJsonProvider (EclipseLink 3.0.2, API Reference)</title>
<meta name="date" content="2021-07-16">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="MOXyJsonProvider (EclipseLink 3.0.2, API Reference)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage">EclipseLink 3.0.2, API Reference</div>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev&nbsp;Class</li>
<li>Next&nbsp;Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/eclipse/persistence/jaxb/rs/MOXyJsonProvider.html" target="_top">Frames</a></li>
<li><a href="MOXyJsonProvider.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.eclipse.persistence.jaxb.rs</div>
<h2 title="Class MOXyJsonProvider" class="title">Class MOXyJsonProvider</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.eclipse.persistence.jaxb.rs.MOXyJsonProvider</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd>jakarta.ws.rs.ext.MessageBodyReader&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&gt;, jakarta.ws.rs.ext.MessageBodyWriter&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&gt;</dd>
</dl>
<hr>
<br>
<pre>@Produces(value={"application/json","*/*","application/x-javascript"})
@Consumes(value={"application/json","*/*"})
@Provider
public class <span class="typeNameLabel">MOXyJsonProvider</span>
extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>
implements jakarta.ws.rs.ext.MessageBodyReader&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&gt;, jakarta.ws.rs.ext.MessageBodyWriter&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&gt;</pre>
<div class="block"><p>This is an implementation of <i>MessageBodyReader</i>/<i>MessageBodyWriter
</i> that can be used to enable EclipseLink JAXB (MOXy) as the JSON
provider.</p>
<p>
<b>Supported Media Type Patterns</b>
<ul>
<li>*&#47;json (i.e. application/json and text/json)</li>
<li>*&#47;*+json</li>
</ul>
<p>Below are some different usage options.</p>
<b>Option #1 - <i>MOXyJsonProvider</i> Default Behavior</b>
<p>You can use the <i>Application</i> class to specify that
<i>MOXyJsonProvider</i> should be used with your JAX-RS application.</p>
<pre>
package org.example;
import java.util.*;
import jakarta.ws.rs.core.Application;
import org.eclipse.persistence.jaxb.rs.MOXyJsonProvider;
public class ExampleApplication extends Application {
&#64;Override
public Set&lt;Class&lt;?&gt;&gt; getClasses() {
HashSet&lt;Class&lt;?&gt;&gt; set = new HashSet&lt;Class&lt;?&gt;&gt;(2);
set.add(MOXyJsonProvider.class);
set.add(ExampleService.class);
return set;
}
}
</pre>
<b>Option #2 - Customize <i>MOXyJsonProvider</i></b>
<p>You can use the <i>Application</i> class to specify a configured instance
of <i>MOXyJsonProvider</i> should be used with your JAX-RS application.</p>
<pre>
package org.example;
import java.util.*;
import jakarta.ws.rs.core.Application;
import org.eclipse.persistence.jaxb.rs.MOXyJsonProvider;
public class CustomerApplication extends Application {
&#64;Override
public Set&lt;Class&lt;?&gt;&gt; getClasses() {
HashSet&lt;Class&lt;?&gt;&gt; set = new HashSet&lt;Class&lt;?&gt;&gt;(1);
set.add(ExampleService.class);
return set;
}
&#64;Override
public Set&lt;Object&gt; getSingletons() {
moxyJsonProvider moxyJsonProvider = new MOXyJsonProvider();
moxyJsonProvider.setFormattedOutput(true);
moxyJsonProvider.setIncludeRoot(true);
HashSet&lt;Object&gt; set = new HashSet&lt;Object&gt;(2);
set.add(moxyJsonProvider);
return set;
}
}
</pre>
<b>Option #3 - Extend MOXyJsonProvider</b>
<p>You can use MOXyJsonProvider for creating your own
<i>MessageBodyReader</i>/<i>MessageBodyWriter</i>.</p>
<pre>
package org.example;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
import jakarta.ws.rs.*;
import jakarta.ws.rs.core.*;
import jakarta.ws.rs.ext.Provider;
import jakarta.xml.bind.*;
import org.eclipse.persistence.jaxb.MarshallerProperties;
import org.eclipse.persistence.jaxb.rs.MOXyJsonProvider;
&#64;Provider
&#64;Produces(MediaType.APPLICATION_JSON)
&#64;Consumes(MediaType.APPLICATION_JSON)
public class CustomerJSONProvider extends MOXyJsonProvider {
&#64;Override
public boolean isReadable(Class&lt;?&gt; type, Type genericType,
Annotation[] annotations, MediaType mediaType) {
return getDomainClass(genericType) == Customer.class;
}
&#64;Override
public boolean isWriteable(Class&lt;?&gt; type, Type genericType,
Annotation[] annotations, MediaType mediaType) {
return isReadable(type, genericType, annotations, mediaType);
}
&#64;Override
protected void preReadFrom(Class&lt;Object&gt; type, Type genericType,
Annotation[] annotations, MediaType mediaType,
MultivaluedMap&lt;String, String&gt; httpHeaders,
Unmarshaller unmarshaller) throws JAXBException {
unmarshaller.setProperty(MarshallerProperties.JSON_VALUE_WRAPPER, "$");
}
&#64;Override
protected void preWriteTo(Object object, Class&lt;?&gt; type, Type genericType,
Annotation[] annotations, MediaType mediaType,
MultivaluedMap&lt;String, Object&gt; httpHeaders, Marshaller marshaller)
throws JAXBException {
marshaller.setProperty(MarshallerProperties.JSON_VALUE_WRAPPER, "$");
}
}
</pre></div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.4</dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected jakarta.ws.rs.ext.Providers</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/jaxb/rs/MOXyJsonProvider.html#providers">providers</a></span></code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/jaxb/rs/MOXyJsonProvider.html#MOXyJsonProvider--">MOXyJsonProvider</a></span>()</code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/jaxb/rs/MOXyJsonProvider.html#getAttributePrefix--">getAttributePrefix</a></span>()</code>
<div class="block">The value that will be prepended to all keys that are mapped to an XML
attribute.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/jaxb/rs/MOXyJsonProvider.html#getDomainClass-java.util.Set-">getDomainClass</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&gt;&nbsp;domainClasses)</code>
<div class="block">Get first non java class if exists.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/jaxb/rs/MOXyJsonProvider.html#getDomainClasses-java.lang.reflect.Type-">getDomainClasses</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;genericType)</code>
<div class="block">A convenience method to get the domain class (i.e.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>protected jakarta.xml.bind.JAXBContext</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/jaxb/rs/MOXyJsonProvider.html#getJAXBContext-java.util.Set-java.lang.annotation.Annotation:A-jakarta.ws.rs.core.MediaType-jakarta.ws.rs.core.MultivaluedMap-">getJAXBContext</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&gt;&nbsp;domainClasses,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Annotation.html?is-external=true" title="class or interface in java.lang.annotation">Annotation</a>[]&nbsp;annotations,
jakarta.ws.rs.core.MediaType&nbsp;mediaType,
jakarta.ws.rs.core.MultivaluedMap&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,?&gt;&nbsp;httpHeaders)</code>
<div class="block">Return the <i>JAXBContext</i> that corresponds to the domain class.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/jaxb/rs/MOXyJsonProvider.html#getNamespacePrefixMapper--">getNamespacePrefixMapper</a></span>()</code>
<div class="block">By default the JSON-binding will ignore namespace qualification.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>char</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/jaxb/rs/MOXyJsonProvider.html#getNamespaceSeparator--">getNamespaceSeparator</a></span>()</code>
<div class="block">This character (default is '.') separates the prefix from the key name.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/jaxb/rs/MOXyJsonProvider.html#getSize-java.lang.Object-java.lang.Class-java.lang.reflect.Type-java.lang.annotation.Annotation:A-jakarta.ws.rs.core.MediaType-">getSize</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;t,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;type,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;genericType,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Annotation.html?is-external=true" title="class or interface in java.lang.annotation">Annotation</a>[]&nbsp;annotations,
jakarta.ws.rs.core.MediaType&nbsp;mediaType)</code>&nbsp;</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/jaxb/rs/MOXyJsonProvider.html#getValueWrapper--">getValueWrapper</a></span>()</code>
<div class="block">The key that will correspond to the property mapped with @XmlValue.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/jaxb/rs/MOXyJsonProvider.html#isFormattedOutput--">isFormattedOutput</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/jaxb/rs/MOXyJsonProvider.html#isIncludeRoot--">isIncludeRoot</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/jaxb/rs/MOXyJsonProvider.html#isMarshalEmptyCollections--">isMarshalEmptyCollections</a></span>()</code>
<div class="block">If true empty collections will be marshalled as empty arrays, else the
collection will not be marshalled to JSON (default is true).</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/jaxb/rs/MOXyJsonProvider.html#isReadable-java.lang.Class-java.lang.reflect.Type-java.lang.annotation.Annotation:A-jakarta.ws.rs.core.MediaType-">isReadable</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;type,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;genericType,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Annotation.html?is-external=true" title="class or interface in java.lang.annotation">Annotation</a>[]&nbsp;annotations,
jakarta.ws.rs.core.MediaType&nbsp;mediaType)</code>&nbsp;</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/jaxb/rs/MOXyJsonProvider.html#isWrapperAsArrayName--">isWrapperAsArrayName</a></span>()</code>
<div class="block">If true the grouping element will be used as the JSON key.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/jaxb/rs/MOXyJsonProvider.html#isWriteable-java.lang.Class-java.lang.reflect.Type-java.lang.annotation.Annotation:A-jakarta.ws.rs.core.MediaType-">isWriteable</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;type,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;genericType,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Annotation.html?is-external=true" title="class or interface in java.lang.annotation">Annotation</a>[]&nbsp;annotations,
jakarta.ws.rs.core.MediaType&nbsp;mediaType)</code>&nbsp;</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/jaxb/rs/MOXyJsonProvider.html#preReadFrom-java.lang.Class-java.lang.reflect.Type-java.lang.annotation.Annotation:A-jakarta.ws.rs.core.MediaType-jakarta.ws.rs.core.MultivaluedMap-jakarta.xml.bind.Unmarshaller-">preReadFrom</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&gt;&nbsp;type,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;genericType,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Annotation.html?is-external=true" title="class or interface in java.lang.annotation">Annotation</a>[]&nbsp;annotations,
jakarta.ws.rs.core.MediaType&nbsp;mediaType,
jakarta.ws.rs.core.MultivaluedMap&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;httpHeaders,
jakarta.xml.bind.Unmarshaller&nbsp;unmarshaller)</code>
<div class="block">Subclasses of <i>MOXyJsonProvider</i> can override this method to
customize the instance of <i>Unmarshaller</i> that will be used to
unmarshal the JSON message in the readFrom call.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/jaxb/rs/MOXyJsonProvider.html#preWriteTo-java.lang.Object-java.lang.Class-java.lang.reflect.Type-java.lang.annotation.Annotation:A-jakarta.ws.rs.core.MediaType-jakarta.ws.rs.core.MultivaluedMap-jakarta.xml.bind.Marshaller-">preWriteTo</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;object,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;type,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;genericType,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Annotation.html?is-external=true" title="class or interface in java.lang.annotation">Annotation</a>[]&nbsp;annotations,
jakarta.ws.rs.core.MediaType&nbsp;mediaType,
jakarta.ws.rs.core.MultivaluedMap&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&gt;&nbsp;httpHeaders,
jakarta.xml.bind.Marshaller&nbsp;marshaller)</code>
<div class="block">Subclasses of <i>MOXyJsonProvider</i> can override this method to
customize the instance of <i>Marshaller</i> that will be used to marshal
the domain objects to JSON in the writeTo call.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/jaxb/rs/MOXyJsonProvider.html#readFrom-java.lang.Class-java.lang.reflect.Type-java.lang.annotation.Annotation:A-jakarta.ws.rs.core.MediaType-jakarta.ws.rs.core.MultivaluedMap-java.io.InputStream-">readFrom</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&gt;&nbsp;type,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;genericType,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Annotation.html?is-external=true" title="class or interface in java.lang.annotation">Annotation</a>[]&nbsp;annotations,
jakarta.ws.rs.core.MediaType&nbsp;mediaType,
jakarta.ws.rs.core.MultivaluedMap&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;httpHeaders,
<a href="https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;entityStream)</code>&nbsp;</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/jaxb/rs/MOXyJsonProvider.html#setAttributePrefix-java.lang.String-">setAttributePrefix</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;attributePrefix)</code>
<div class="block">Specify a value that will be prepended to all keys that are mapped to an
XML attribute.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/jaxb/rs/MOXyJsonProvider.html#setFormattedOutput-boolean-">setFormattedOutput</a></span>(boolean&nbsp;formattedOutput)</code>
<div class="block">Specify if the JSON output should be formatted (default is false).</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/jaxb/rs/MOXyJsonProvider.html#setIncludeRoot-boolean-">setIncludeRoot</a></span>(boolean&nbsp;includeRoot)</code>
<div class="block">Specify if the root node should be included in the JSON message (default
is false).</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/jaxb/rs/MOXyJsonProvider.html#setMarshalEmptyCollections-boolean-">setMarshalEmptyCollections</a></span>(boolean&nbsp;marshalEmptyCollections)</code>
<div class="block">If true empty collections will be marshalled as empty arrays, else the
collection will not be marshalled to JSON (default is true).</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/jaxb/rs/MOXyJsonProvider.html#setNamespacePrefixMapper-java.util.Map-">setNamespacePrefixMapper</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;namespacePrefixMapper)</code>
<div class="block">By default the JSON-binding will ignore namespace qualification.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/jaxb/rs/MOXyJsonProvider.html#setNamespaceSeparator-char-">setNamespaceSeparator</a></span>(char&nbsp;namespaceSeparator)</code>
<div class="block">This character (default is '.') separates the prefix from the key name.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/jaxb/rs/MOXyJsonProvider.html#setValueWrapper-java.lang.String-">setValueWrapper</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;valueWrapper)</code>
<div class="block">Specify the key that will correspond to the property mapped with
@XmlValue.</div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/jaxb/rs/MOXyJsonProvider.html#setWrapperAsArrayName-boolean-">setWrapperAsArrayName</a></span>(boolean&nbsp;wrapperAsArrayName)</code>
<div class="block">If true the grouping element will be used as the JSON key.</div>
</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code>protected boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/jaxb/rs/MOXyJsonProvider.html#supportsMediaType-jakarta.ws.rs.core.MediaType-">supportsMediaType</a></span>(jakarta.ws.rs.core.MediaType&nbsp;mediaType)</code>&nbsp;</td>
</tr>
<tr id="i26" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/jaxb/rs/MOXyJsonProvider.html#writeTo-java.lang.Object-java.lang.Class-java.lang.reflect.Type-java.lang.annotation.Annotation:A-jakarta.ws.rs.core.MediaType-jakarta.ws.rs.core.MultivaluedMap-java.io.OutputStream-">writeTo</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;object,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;type,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;genericType,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Annotation.html?is-external=true" title="class or interface in java.lang.annotation">Annotation</a>[]&nbsp;annotations,
jakarta.ws.rs.core.MediaType&nbsp;mediaType,
jakarta.ws.rs.core.MultivaluedMap&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&gt;&nbsp;httpHeaders,
<a href="https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;entityStream)</code>&nbsp;</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="providers">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>providers</h4>
<pre>@Context
protected&nbsp;jakarta.ws.rs.ext.Providers providers</pre>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="MOXyJsonProvider--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>MOXyJsonProvider</h4>
<pre>public&nbsp;MOXyJsonProvider()</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getAttributePrefix--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAttributePrefix</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getAttributePrefix()</pre>
<div class="block">The value that will be prepended to all keys that are mapped to an XML
attribute. By default there is no attribute prefix.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/eclipse/persistence/jaxb/MarshallerProperties.html#JSON_ATTRIBUTE_PREFIX"><code>MarshallerProperties.JSON_ATTRIBUTE_PREFIX</code></a>,
<a href="../../../../../org/eclipse/persistence/jaxb/UnmarshallerProperties.html#JSON_ATTRIBUTE_PREFIX"><code>UnmarshallerProperties.JSON_ATTRIBUTE_PREFIX</code></a></dd>
</dl>
</li>
</ul>
<a name="getDomainClasses-java.lang.reflect.Type-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDomainClasses</h4>
<pre>protected&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&gt;&nbsp;getDomainClasses(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;genericType)</pre>
<div class="block">A convenience method to get the domain class (i.e. <i>Customer</i> or <i>Foo, Bar</i>) from
the parameter/return type (i.e. <i>Customer</i>, <i>List&lt;Customer&gt;</i>,
<i>JAXBElement&lt;Customer&gt;</i>, <i>JAXBElement&lt;? extends Customer&gt;</i>,
<i>List&lt;JAXBElement&lt;Customer&gt;&gt;</i>, or
<i>List&lt;JAXBElement&lt;? extends Customer&gt;&gt;</i>
<i>List&lt;Foo&lt;Bar&gt;&gt;</i>).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>genericType</code> - - The parameter/return type of the JAX-RS operation.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The corresponding domain classes.</dd>
</dl>
</li>
</ul>
<a name="getJAXBContext-java.util.Set-java.lang.annotation.Annotation:A-jakarta.ws.rs.core.MediaType-jakarta.ws.rs.core.MultivaluedMap-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getJAXBContext</h4>
<pre>protected&nbsp;jakarta.xml.bind.JAXBContext&nbsp;getJAXBContext(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&gt;&nbsp;domainClasses,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Annotation.html?is-external=true" title="class or interface in java.lang.annotation">Annotation</a>[]&nbsp;annotations,
jakarta.ws.rs.core.MediaType&nbsp;mediaType,
jakarta.ws.rs.core.MultivaluedMap&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,?&gt;&nbsp;httpHeaders)
throws jakarta.xml.bind.JAXBException</pre>
<div class="block">Return the <i>JAXBContext</i> that corresponds to the domain class. This
method does the following:
<ol>
<li>If an EclipseLink JAXB (MOXy) <i>JAXBContext</i> is available from
a <i>ContextResolver</i> then use it.</li>
<li>If an existing <i>JAXBContext</i> was not found in step one, then
create a new one on the domain class.</li>
</ol></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>domainClasses</code> - - The domain classes we need a <i>JAXBContext</i> for.</dd>
<dd><code>annotations</code> - - The annotations corresponding to domain object.</dd>
<dd><code>mediaType</code> - - The media type for the HTTP entity.</dd>
<dd><code>httpHeaders</code> - - HTTP headers associated with HTTP entity.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>jakarta.xml.bind.JAXBException</code></dd>
</dl>
</li>
</ul>
<a name="getNamespacePrefixMapper--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNamespacePrefixMapper</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;getNamespacePrefixMapper()</pre>
<div class="block">By default the JSON-binding will ignore namespace qualification. If this
property is set the portion of the key before the namespace separator
will be used to determine the namespace URI.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/eclipse/persistence/jaxb/MarshallerProperties.html#NAMESPACE_PREFIX_MAPPER"><code>MarshallerProperties.NAMESPACE_PREFIX_MAPPER</code></a>,
<a href="../../../../../org/eclipse/persistence/jaxb/UnmarshallerProperties.html#JSON_NAMESPACE_PREFIX_MAPPER"><code>UnmarshallerProperties.JSON_NAMESPACE_PREFIX_MAPPER</code></a></dd>
</dl>
</li>
</ul>
<a name="getNamespaceSeparator--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNamespaceSeparator</h4>
<pre>public&nbsp;char&nbsp;getNamespaceSeparator()</pre>
<div class="block">This character (default is '.') separates the prefix from the key name.
It is only used if namespace qualification has been enabled be setting a
namespace prefix mapper.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/eclipse/persistence/jaxb/MarshallerProperties.html#JSON_NAMESPACE_SEPARATOR"><code>MarshallerProperties.JSON_NAMESPACE_SEPARATOR</code></a>,
<a href="../../../../../org/eclipse/persistence/jaxb/UnmarshallerProperties.html#JSON_NAMESPACE_SEPARATOR"><code>UnmarshallerProperties.JSON_NAMESPACE_SEPARATOR</code></a></dd>
</dl>
</li>
</ul>
<a name="getSize-java.lang.Object-java.lang.Class-java.lang.reflect.Type-java.lang.annotation.Annotation:A-jakarta.ws.rs.core.MediaType-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSize</h4>
<pre>public&nbsp;long&nbsp;getSize(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;t,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;type,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;genericType,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Annotation.html?is-external=true" title="class or interface in java.lang.annotation">Annotation</a>[]&nbsp;annotations,
jakarta.ws.rs.core.MediaType&nbsp;mediaType)</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code>getSize</code>&nbsp;in interface&nbsp;<code>jakarta.ws.rs.ext.MessageBodyWriter&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&gt;</code></dd>
</dl>
</li>
</ul>
<a name="getValueWrapper--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getValueWrapper</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getValueWrapper()</pre>
<div class="block">The key that will correspond to the property mapped with @XmlValue. This
key will only be used if there are other mapped properties.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/eclipse/persistence/jaxb/MarshallerProperties.html#JSON_VALUE_WRAPPER"><code>MarshallerProperties.JSON_VALUE_WRAPPER</code></a>,
<a href="../../../../../org/eclipse/persistence/jaxb/UnmarshallerProperties.html#JSON_VALUE_WRAPPER"><code>UnmarshallerProperties.JSON_VALUE_WRAPPER</code></a></dd>
</dl>
</li>
</ul>
<a name="isFormattedOutput--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isFormattedOutput</h4>
<pre>public&nbsp;boolean&nbsp;isFormattedOutput()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the JSON output should be formatted (default is false).</dd>
</dl>
</li>
</ul>
<a name="isIncludeRoot--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isIncludeRoot</h4>
<pre>public&nbsp;boolean&nbsp;isIncludeRoot()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the root node is included in the JSON message (default is
false).</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/eclipse/persistence/jaxb/MarshallerProperties.html#JSON_INCLUDE_ROOT"><code>MarshallerProperties.JSON_INCLUDE_ROOT</code></a>,
<a href="../../../../../org/eclipse/persistence/jaxb/UnmarshallerProperties.html#JSON_INCLUDE_ROOT"><code>UnmarshallerProperties.JSON_INCLUDE_ROOT</code></a></dd>
</dl>
</li>
</ul>
<a name="isMarshalEmptyCollections--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isMarshalEmptyCollections</h4>
<pre>public&nbsp;boolean&nbsp;isMarshalEmptyCollections()</pre>
<div class="block">If true empty collections will be marshalled as empty arrays, else the
collection will not be marshalled to JSON (default is true).</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/eclipse/persistence/jaxb/MarshallerProperties.html#JSON_MARSHAL_EMPTY_COLLECTIONS"><code>MarshallerProperties.JSON_MARSHAL_EMPTY_COLLECTIONS</code></a></dd>
</dl>
</li>
</ul>
<a name="isReadable-java.lang.Class-java.lang.reflect.Type-java.lang.annotation.Annotation:A-jakarta.ws.rs.core.MediaType-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isReadable</h4>
<pre>public&nbsp;boolean&nbsp;isReadable(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;type,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;genericType,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Annotation.html?is-external=true" title="class or interface in java.lang.annotation">Annotation</a>[]&nbsp;annotations,
jakarta.ws.rs.core.MediaType&nbsp;mediaType)</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code>isReadable</code>&nbsp;in interface&nbsp;<code>jakarta.ws.rs.ext.MessageBodyReader&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&gt;</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true indicating that <i>MOXyJsonProvider</i> will
be used for the JSON binding if the media type is of the following
patterns *&#47;json or *&#47;*+json, and the type is not assignable from
any of (or a Collection or JAXBElement of) the following:
<ul>
<li>byte[]</li>
<li>java.io.File</li>
<li>java.io.InputStream</li>
<li>java.io.Reader</li>
<li>java.lang.Object</li>
<li>java.lang.String</li>
<li>jakarta.activation.DataSource</li>
</ul></dd>
</dl>
</li>
</ul>
<a name="isWrapperAsArrayName--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isWrapperAsArrayName</h4>
<pre>public&nbsp;boolean&nbsp;isWrapperAsArrayName()</pre>
<div class="block">If true the grouping element will be used as the JSON key.
<p><b>Example</b></p>
<p>Given the following class:</p>
<pre>
&#64;XmlAccessorType(XmlAccessType.FIELD)
public class Customer {
&#64;XmlElementWrapper(name="phone-numbers")
&#64;XmlElement(name="phone-number")
private List&lt;PhoneNumber&gt; phoneNumbers;
}
</pre>
<p>If the property is set to false (the default) the JSON output will be:</p>
<pre>
{
"phone-numbers" : {
"phone-number" : [ {
...
}, {
...
}]
}
}
</pre>
<p>And if the property is set to true, then the JSON output will be:</p>
<pre>
{
"phone-numbers" : [ {
...
}, {
...
}]
}
</pre></div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/eclipse/persistence/jaxb/JAXBContextProperties.html#JSON_WRAPPER_AS_ARRAY_NAME"><code>JAXBContextProperties.JSON_WRAPPER_AS_ARRAY_NAME</code></a>,
<a href="../../../../../org/eclipse/persistence/jaxb/MarshallerProperties.html#JSON_WRAPPER_AS_ARRAY_NAME"><code>MarshallerProperties.JSON_WRAPPER_AS_ARRAY_NAME</code></a>,
<a href="../../../../../org/eclipse/persistence/jaxb/UnmarshallerProperties.html#JSON_WRAPPER_AS_ARRAY_NAME"><code>UnmarshallerProperties.JSON_WRAPPER_AS_ARRAY_NAME</code></a></dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.4.2</dd>
</dl>
</li>
</ul>
<a name="isWriteable-java.lang.Class-java.lang.reflect.Type-java.lang.annotation.Annotation:A-jakarta.ws.rs.core.MediaType-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isWriteable</h4>
<pre>public&nbsp;boolean&nbsp;isWriteable(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;type,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;genericType,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Annotation.html?is-external=true" title="class or interface in java.lang.annotation">Annotation</a>[]&nbsp;annotations,
jakarta.ws.rs.core.MediaType&nbsp;mediaType)</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code>isWriteable</code>&nbsp;in interface&nbsp;<code>jakarta.ws.rs.ext.MessageBodyWriter&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&gt;</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true indicating that <i>MOXyJsonProvider</i> will
be used for the JSON binding if the media type is of the following
patterns *&#47;json or *&#47;*+json, and the type is not assignable from
any of (or a Collection or JAXBElement of) the following:
<ul>
<li>byte[]</li>
<li>java.io.File</li>
<li>java.lang.Object</li>
<li>java.lang.String</li>
<li>jakarta.activation.DataSource</li>
<li>jakarta.ws.rs.core.StreamingOutput</li>
</ul></dd>
</dl>
</li>
</ul>
<a name="preReadFrom-java.lang.Class-java.lang.reflect.Type-java.lang.annotation.Annotation:A-jakarta.ws.rs.core.MediaType-jakarta.ws.rs.core.MultivaluedMap-jakarta.xml.bind.Unmarshaller-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>preReadFrom</h4>
<pre>protected&nbsp;void&nbsp;preReadFrom(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&gt;&nbsp;type,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;genericType,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Annotation.html?is-external=true" title="class or interface in java.lang.annotation">Annotation</a>[]&nbsp;annotations,
jakarta.ws.rs.core.MediaType&nbsp;mediaType,
jakarta.ws.rs.core.MultivaluedMap&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;httpHeaders,
jakarta.xml.bind.Unmarshaller&nbsp;unmarshaller)
throws jakarta.xml.bind.JAXBException</pre>
<div class="block">Subclasses of <i>MOXyJsonProvider</i> can override this method to
customize the instance of <i>Unmarshaller</i> that will be used to
unmarshal the JSON message in the readFrom call.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>type</code> - - The Class to be unmarshalled (i.e. <i>Customer</i> or
<i>List</i>)</dd>
<dd><code>genericType</code> - - The type of object to be unmarshalled (i.e
<i>Customer</i> or <i>List&lt;Customer&gt;</i>).</dd>
<dd><code>annotations</code> - - The annotations corresponding to domain object.</dd>
<dd><code>mediaType</code> - - The media type for the HTTP entity.</dd>
<dd><code>httpHeaders</code> - - HTTP headers associated with HTTP entity.</dd>
<dd><code>unmarshaller</code> - - The instance of <i>Unmarshaller</i> that will be
used to unmarshal the JSON message.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>jakarta.xml.bind.JAXBException</code></dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/eclipse/persistence/jaxb/UnmarshallerProperties.html" title="class in org.eclipse.persistence.jaxb"><code>UnmarshallerProperties</code></a></dd>
</dl>
</li>
</ul>
<a name="preWriteTo-java.lang.Object-java.lang.Class-java.lang.reflect.Type-java.lang.annotation.Annotation:A-jakarta.ws.rs.core.MediaType-jakarta.ws.rs.core.MultivaluedMap-jakarta.xml.bind.Marshaller-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>preWriteTo</h4>
<pre>protected&nbsp;void&nbsp;preWriteTo(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;object,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;type,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;genericType,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Annotation.html?is-external=true" title="class or interface in java.lang.annotation">Annotation</a>[]&nbsp;annotations,
jakarta.ws.rs.core.MediaType&nbsp;mediaType,
jakarta.ws.rs.core.MultivaluedMap&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&gt;&nbsp;httpHeaders,
jakarta.xml.bind.Marshaller&nbsp;marshaller)
throws jakarta.xml.bind.JAXBException</pre>
<div class="block">Subclasses of <i>MOXyJsonProvider</i> can override this method to
customize the instance of <i>Marshaller</i> that will be used to marshal
the domain objects to JSON in the writeTo call.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>object</code> - - The domain object that will be marshalled to JSON.</dd>
<dd><code>type</code> - - The Class to be marshalled (i.e. <i>Customer</i> or
<i>List</i>)</dd>
<dd><code>genericType</code> - - The type of object to be marshalled (i.e
<i>Customer</i> or <i>List&lt;Customer&gt;</i>).</dd>
<dd><code>annotations</code> - - The annotations corresponding to domain object.</dd>
<dd><code>mediaType</code> - - The media type for the HTTP entity.</dd>
<dd><code>httpHeaders</code> - - HTTP headers associated with HTTP entity.</dd>
<dd><code>marshaller</code> - - The instance of <i>Marshaller</i> that will be used
to marshal the domain object to JSON.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>jakarta.xml.bind.JAXBException</code></dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/eclipse/persistence/jaxb/MarshallerProperties.html" title="class in org.eclipse.persistence.jaxb"><code>MarshallerProperties</code></a></dd>
</dl>
</li>
</ul>
<a name="readFrom-java.lang.Class-java.lang.reflect.Type-java.lang.annotation.Annotation:A-jakarta.ws.rs.core.MediaType-jakarta.ws.rs.core.MultivaluedMap-java.io.InputStream-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readFrom</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;readFrom(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&gt;&nbsp;type,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;genericType,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Annotation.html?is-external=true" title="class or interface in java.lang.annotation">Annotation</a>[]&nbsp;annotations,
jakarta.ws.rs.core.MediaType&nbsp;mediaType,
jakarta.ws.rs.core.MultivaluedMap&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;httpHeaders,
<a href="https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;entityStream)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a>,
jakarta.ws.rs.WebApplicationException</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code>readFrom</code>&nbsp;in interface&nbsp;<code>jakarta.ws.rs.ext.MessageBodyReader&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&gt;</code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd>
<dd><code>jakarta.ws.rs.WebApplicationException</code></dd>
</dl>
</li>
</ul>
<a name="getDomainClass-java.util.Set-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDomainClass</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;getDomainClass(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&gt;&nbsp;domainClasses)</pre>
<div class="block">Get first non java class if exists.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>domainClasses</code> - </dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>first domain class or first generic class or just the first class from the list</dd>
</dl>
</li>
</ul>
<a name="setAttributePrefix-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setAttributePrefix</h4>
<pre>public&nbsp;void&nbsp;setAttributePrefix(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;attributePrefix)</pre>
<div class="block">Specify a value that will be prepended to all keys that are mapped to an
XML attribute. By default there is no attribute prefix.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/eclipse/persistence/jaxb/MarshallerProperties.html#JSON_ATTRIBUTE_PREFIX"><code>MarshallerProperties.JSON_ATTRIBUTE_PREFIX</code></a>,
<a href="../../../../../org/eclipse/persistence/jaxb/UnmarshallerProperties.html#JSON_ATTRIBUTE_PREFIX"><code>UnmarshallerProperties.JSON_ATTRIBUTE_PREFIX</code></a></dd>
</dl>
</li>
</ul>
<a name="setFormattedOutput-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setFormattedOutput</h4>
<pre>public&nbsp;void&nbsp;setFormattedOutput(boolean&nbsp;formattedOutput)</pre>
<div class="block">Specify if the JSON output should be formatted (default is false).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>formattedOutput</code> - - true if the output should be formatted, else
false.</dd>
</dl>
</li>
</ul>
<a name="setIncludeRoot-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setIncludeRoot</h4>
<pre>public&nbsp;void&nbsp;setIncludeRoot(boolean&nbsp;includeRoot)</pre>
<div class="block">Specify if the root node should be included in the JSON message (default
is false).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>includeRoot</code> - - true if the message includes the root node, else
false.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/eclipse/persistence/jaxb/MarshallerProperties.html#JSON_INCLUDE_ROOT"><code>MarshallerProperties.JSON_INCLUDE_ROOT</code></a>,
<a href="../../../../../org/eclipse/persistence/jaxb/UnmarshallerProperties.html#JSON_INCLUDE_ROOT"><code>UnmarshallerProperties.JSON_INCLUDE_ROOT</code></a></dd>
</dl>
</li>
</ul>
<a name="setMarshalEmptyCollections-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMarshalEmptyCollections</h4>
<pre>public&nbsp;void&nbsp;setMarshalEmptyCollections(boolean&nbsp;marshalEmptyCollections)</pre>
<div class="block">If true empty collections will be marshalled as empty arrays, else the
collection will not be marshalled to JSON (default is true).</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/eclipse/persistence/jaxb/MarshallerProperties.html#JSON_MARSHAL_EMPTY_COLLECTIONS"><code>MarshallerProperties.JSON_MARSHAL_EMPTY_COLLECTIONS</code></a></dd>
</dl>
</li>
</ul>
<a name="setNamespacePrefixMapper-java.util.Map-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setNamespacePrefixMapper</h4>
<pre>public&nbsp;void&nbsp;setNamespacePrefixMapper(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;namespacePrefixMapper)</pre>
<div class="block">By default the JSON-binding will ignore namespace qualification. If this
property is set then a prefix corresponding to the namespace URI and a
namespace separator will be prefixed to the key.
include it you can specify a Map of namespace URI to prefix.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/eclipse/persistence/jaxb/MarshallerProperties.html#NAMESPACE_PREFIX_MAPPER"><code>MarshallerProperties.NAMESPACE_PREFIX_MAPPER</code></a>,
<a href="../../../../../org/eclipse/persistence/jaxb/UnmarshallerProperties.html#JSON_NAMESPACE_PREFIX_MAPPER"><code>UnmarshallerProperties.JSON_NAMESPACE_PREFIX_MAPPER</code></a></dd>
</dl>
</li>
</ul>
<a name="setNamespaceSeparator-char-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setNamespaceSeparator</h4>
<pre>public&nbsp;void&nbsp;setNamespaceSeparator(char&nbsp;namespaceSeparator)</pre>
<div class="block">This character (default is '.') separates the prefix from the key name.
It is only used if namespace qualification has been enabled be setting a
namespace prefix mapper.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/eclipse/persistence/jaxb/MarshallerProperties.html#JSON_NAMESPACE_SEPARATOR"><code>MarshallerProperties.JSON_NAMESPACE_SEPARATOR</code></a>,
<a href="../../../../../org/eclipse/persistence/jaxb/UnmarshallerProperties.html#JSON_NAMESPACE_SEPARATOR"><code>UnmarshallerProperties.JSON_NAMESPACE_SEPARATOR</code></a></dd>
</dl>
</li>
</ul>
<a name="setWrapperAsArrayName-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setWrapperAsArrayName</h4>
<pre>public&nbsp;void&nbsp;setWrapperAsArrayName(boolean&nbsp;wrapperAsArrayName)</pre>
<div class="block">If true the grouping element will be used as the JSON key.
<p><b>Example</b></p>
<p>Given the following class:</p>
<pre>
&#64;XmlAccessorType(XmlAccessType.FIELD)
public class Customer {
&#64;XmlElementWrapper(name="phone-numbers")
&#64;XmlElement(name="phone-number")
private List&lt;PhoneNumber&gt; phoneNumbers;
}
</pre>
<p>If the property is set to false (the default) the JSON output will be:</p>
<pre>
{
"phone-numbers" : {
"phone-number" : [ {
...
}, {
...
}]
}
}
</pre>
<p>And if the property is set to true, then the JSON output will be:</p>
<pre>
{
"phone-numbers" : [ {
...
}, {
...
}]
}
</pre></div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/eclipse/persistence/jaxb/JAXBContextProperties.html#JSON_WRAPPER_AS_ARRAY_NAME"><code>JAXBContextProperties.JSON_WRAPPER_AS_ARRAY_NAME</code></a>,
<a href="../../../../../org/eclipse/persistence/jaxb/MarshallerProperties.html#JSON_WRAPPER_AS_ARRAY_NAME"><code>MarshallerProperties.JSON_WRAPPER_AS_ARRAY_NAME</code></a>,
<a href="../../../../../org/eclipse/persistence/jaxb/UnmarshallerProperties.html#JSON_WRAPPER_AS_ARRAY_NAME"><code>UnmarshallerProperties.JSON_WRAPPER_AS_ARRAY_NAME</code></a></dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.4.2</dd>
</dl>
</li>
</ul>
<a name="setValueWrapper-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setValueWrapper</h4>
<pre>public&nbsp;void&nbsp;setValueWrapper(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;valueWrapper)</pre>
<div class="block">Specify the key that will correspond to the property mapped with
@XmlValue. This key will only be used if there are other mapped
properties.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/eclipse/persistence/jaxb/MarshallerProperties.html#JSON_VALUE_WRAPPER"><code>MarshallerProperties.JSON_VALUE_WRAPPER</code></a>,
<a href="../../../../../org/eclipse/persistence/jaxb/UnmarshallerProperties.html#JSON_VALUE_WRAPPER"><code>UnmarshallerProperties.JSON_VALUE_WRAPPER</code></a></dd>
</dl>
</li>
</ul>
<a name="supportsMediaType-jakarta.ws.rs.core.MediaType-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>supportsMediaType</h4>
<pre>protected&nbsp;boolean&nbsp;supportsMediaType(jakarta.ws.rs.core.MediaType&nbsp;mediaType)</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true for all media types of the pattern *&#47;json and
*&#47;*+json.</dd>
</dl>
</li>
</ul>
<a name="writeTo-java.lang.Object-java.lang.Class-java.lang.reflect.Type-java.lang.annotation.Annotation:A-jakarta.ws.rs.core.MediaType-jakarta.ws.rs.core.MultivaluedMap-java.io.OutputStream-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>writeTo</h4>
<pre>public&nbsp;void&nbsp;writeTo(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;object,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;type,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;genericType,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Annotation.html?is-external=true" title="class or interface in java.lang.annotation">Annotation</a>[]&nbsp;annotations,
jakarta.ws.rs.core.MediaType&nbsp;mediaType,
jakarta.ws.rs.core.MultivaluedMap&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&gt;&nbsp;httpHeaders,
<a href="https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;entityStream)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a>,
jakarta.ws.rs.WebApplicationException</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code>writeTo</code>&nbsp;in interface&nbsp;<code>jakarta.ws.rs.ext.MessageBodyWriter&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&gt;</code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd>
<dd><code>jakarta.ws.rs.WebApplicationException</code></dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><code>MessageBodyWriter.writeTo(java.lang.Object, java.lang.Class, java.lang.reflect.Type, java.lang.annotation.Annotation[], jakarta.ws.rs.core.MediaType, jakarta.ws.rs.core.MultivaluedMap, java.io.OutputStream)</code></dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage">EclipseLink 3.0.2, API Reference</div>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev&nbsp;Class</li>
<li>Next&nbsp;Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/eclipse/persistence/jaxb/rs/MOXyJsonProvider.html" target="_top">Frames</a></li>
<li><a href="MOXyJsonProvider.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2007&#x2013;2021 <a href="http://www.eclipse.org/eclipselink">Eclipse.org - EclipseLink Project</a>. All rights reserved.</small></p>
</body>
</html>