You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@axis.apache.org by ro...@apache.org on 2026/05/11 15:24:16 UTC
(axis-axis2-java-core) branch master updated: docs: Mention Gson alongside Moshi in OpenAPI REST userguide
This is an automated email from the ASF dual-hosted git repository.
robertlazarski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git
The following commit(s) were added to refs/heads/master by this push:
new b06ad9ecaa docs: Mention Gson alongside Moshi in OpenAPI REST userguide
b06ad9ecaa is described below
commit b06ad9ecaa8e8588b95f8e4fc1106c826331d3e8
Author: Robert Lazarski <ro...@gmail.com>
AuthorDate: Mon May 11 04:27:29 2026 -1000
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) <no...@anthropic.com>
---
src/site/xdoc/docs/openapi-rest-userguide.xml | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/site/xdoc/docs/openapi-rest-userguide.xml b/src/site/xdoc/docs/openapi-rest-userguide.xml
index 994680e02b..ab3d45a202 100644
--- a/src/site/xdoc/docs/openapi-rest-userguide.xml
+++ b/src/site/xdoc/docs/openapi-rest-userguide.xml
@@ -213,9 +213,14 @@ public class DataManagementService {
}
</pre>
-<h3>Request/Response Models with Moshi</h3>
+<h3>Request/Response Models</h3>
-<p>Axis2 uses Moshi for JSON processing, providing clean, efficient serialization:</p>
+<p>Axis2 supports multiple JSON libraries — Moshi, Gson, and a streaming
+formatter — each with standard and HTTP/2-enhanced variants. Select the
+library by choosing the corresponding message builder and formatter
+classes in axis2.xml. The examples below use Moshi's <code>@Json</code>
+annotation; Gson provides equivalent functionality with
+<code>@SerializedName</code>:</p>
<pre>
public class LoginRequest {
@@ -550,7 +555,7 @@ public DataResponse processData(DataRequest request)
<h3>Performance Optimizations</h3>
<ul>
-<li><strong>Moshi JSON Processing:</strong> High-performance JSON serialization optimized for large payloads</li>
+<li><strong>JSON Processing:</strong> Choice of Moshi, Gson, or streaming formatters — each with HTTP/2-enhanced variants for large payloads</li>
<li><strong>Service Caching:</strong> OpenAPI spec generation results are cached for improved response times</li>
<li><strong>CORS Optimization:</strong> Efficient CORS header handling for browser-based applications</li>
<li><strong>Memory Management:</strong> Streaming support for large request/response payloads</li>