Skip to content

Commit b06ad9e

Browse files
docs: Mention Gson alongside Moshi in OpenAPI REST userguide
The guide stated "Axis2 uses Moshi" as if it were the only JSON library. Axis2 actually supports four JSON families: - Moshi (standard + H2-enhanced) - Gson (standard + H2-enhanced) - Streaming (JSONStreamingMessageFormatter, MoshiStreamingMessageFormatter) - Legacy Badgerfish Updated the Request/Response Models section and Performance section to reflect the full library choice. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 73a75cb commit b06ad9e

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

src/site/xdoc/docs/openapi-rest-userguide.xml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,14 @@ public class DataManagementService {
213213
}
214214
</pre>
215215

216-
<h3>Request/Response Models with Moshi</h3>
216+
<h3>Request/Response Models</h3>
217217

218-
<p>Axis2 uses Moshi for JSON processing, providing clean, efficient serialization:</p>
218+
<p>Axis2 supports multiple JSON libraries — Moshi, Gson, and a streaming
219+
formatter — each with standard and HTTP/2-enhanced variants. Select the
220+
library by choosing the corresponding message builder and formatter
221+
classes in axis2.xml. The examples below use Moshi's <code>@Json</code>
222+
annotation; Gson provides equivalent functionality with
223+
<code>@SerializedName</code>:</p>
219224

220225
<pre>
221226
public class LoginRequest {
@@ -550,7 +555,7 @@ public DataResponse processData(DataRequest request)
550555
<h3>Performance Optimizations</h3>
551556

552557
<ul>
553-
<li><strong>Moshi JSON Processing:</strong> High-performance JSON serialization optimized for large payloads</li>
558+
<li><strong>JSON Processing:</strong> Choice of Moshi, Gson, or streaming formatters — each with HTTP/2-enhanced variants for large payloads</li>
554559
<li><strong>Service Caching:</strong> OpenAPI spec generation results are cached for improved response times</li>
555560
<li><strong>CORS Optimization:</strong> Efficient CORS header handling for browser-based applications</li>
556561
<li><strong>Memory Management:</strong> Streaming support for large request/response payloads</li>

0 commit comments

Comments
 (0)