This is an automated email from the ASF dual-hosted git repository.
jamesbognar pushed a commit to branch docs
in repository https://gitbox.apache.org/repos/asf/juneau.git
The following commit(s) were added to refs/heads/docs by this push:
new 47ec6e96d8 docs: add SSE + HAL/JsonApi/JsonPatch/RFC7807 topic pages,
9.5.0 release notes for SSE/MessagePack/FULL-logging fix, regenerate AI
knowledge bundle
47ec6e96d8 is described below
commit 47ec6e96d84e65b0e53a312949547a285ad675f6
Author: James Bognar <[email protected]>
AuthorDate: Wed May 20 09:10:31 2026 -0400
docs: add SSE + HAL/JsonApi/JsonPatch/RFC7807 topic pages, 9.5.0 release
notes for SSE/MessagePack/FULL-logging fix, regenerate AI knowledge bundle
- pages/topics: new SseBasics, JuneauBeanRfc7807, JuneauBeanHal,
JuneauBeanJsonApi, JuneauBeanJsonPatch
- pages/topics: ofText->ofString rename in Marshalling/ObjectTools;
MessagePack media-type normalization note; V9.5 migration-guide updates
- pages/release-notes/9.5.0: SSE support, MessagePack application/msgpack
media-type, new bean modules (hal/jsonapi/jsonpatch/rfc7807), FULL-detail
logging stream-closed fix
- sidebars.ts: wire up new topic pages
- static/ai: regenerate juneau-knowledge.jsonl, manifest.json, taxonomy.json
Co-authored-by: Cursor <[email protected]>
---
pages/release-notes/9.5.0.md | 275 ++++++++++++++++++++++++++++-
pages/topics/01.02.Marshalling.md | 4 +-
pages/topics/02.23.ObjectTools.md | 4 +-
pages/topics/02.31.01.MessagePackBasics.md | 7 +
pages/topics/02.43.01.SseBasics.md | 174 ++++++++++++++++++
pages/topics/04.09.JuneauBeanRfc7807.md | 132 ++++++++++++++
pages/topics/04.10.JuneauBeanHal.md | 108 +++++++++++
pages/topics/04.11.JuneauBeanJsonApi.md | 139 +++++++++++++++
pages/topics/04.12.JuneauBeanJsonPatch.md | 117 ++++++++++++
pages/topics/23.01.V9.5-migration-guide.md | 8 +-
sidebars.ts | 32 ++++
static/ai/juneau-knowledge.jsonl | 43 +++--
static/ai/manifest.json | 8 +-
static/ai/taxonomy.json | 11 +-
14 files changed, 1021 insertions(+), 41 deletions(-)
diff --git a/pages/release-notes/9.5.0.md b/pages/release-notes/9.5.0.md
index 05a1f20880..61aaebb5ee 100644
--- a/pages/release-notes/9.5.0.md
+++ b/pages/release-notes/9.5.0.md
@@ -63,7 +63,7 @@ neutral, marshaller-agnostic base, with JSON5-flavored
siblings in `org.apache.j
**Behavioral break.** `JsonMap.toString()` and `JsonList.toString()` now
return strict
[RFC 8259](https://www.rfc-editor.org/rfc/rfc8259) JSON (was JSON5), and their
`(CharSequence)` /
-`(Reader)` constructors and `ofText(...)` factories (renamed from
`ofJson(...)`) now default to
+`(Reader)` constructors and `ofString(...)` factories (renamed from
`ofJson(...)`) now default to
`JsonParser.DEFAULT` (was `Json5Parser.DEFAULT`). See the
[v9.5 Migration Guide](/docs/topics/V9.5-migration-guide) for the full
breakdown and the
recommended fix paths.
@@ -84,8 +84,9 @@ recommended fix paths.
##### `JsonMap` / `JsonList` retargeted to strict JSON (breaking)
- `toString()` now returns `Json.of(this)` — strict RFC 8259 JSON (was
`Json5.of(this)`).
-- `(CharSequence)` / `(Reader)` constructors and the renamed `ofText(...)`
static factories
+- `(CharSequence)` / `(Reader)` constructors and the renamed `ofString(...)`
static factories
(previously `ofJson(...)`) now default to `JsonParser.DEFAULT` (was
`Json5Parser.DEFAULT`).
+- `ofText(...)` remains available as a deprecated forwarding alias for
compatibility with existing callers.
Bare-constructor calls that feed JSON5 input (unquoted keys, single-quoted
strings) into
`new JsonMap(...)` will now throw `ParseException`.
- The JSON-specific helpers `toJson()` / `toJson5()` / `toJsonl()` / `toJcs()`
/ `toHjson()` /
@@ -96,7 +97,7 @@ recommended fix paths.
- `Json5Map` (extends `MarshalledMap`) and `Json5List` (extends
`MarshalledList`) carry the JSON5
flavor that `JsonMap` / `JsonList` used to carry: `toString()` returns
`Json5.of(this)`,
- `(CharSequence)` / `(Reader)` constructors default to `Json5Parser.DEFAULT`,
single-arg `ofText(...)`
+ `(CharSequence)` / `(Reader)` constructors default to `Json5Parser.DEFAULT`,
single-arg `ofString(...)`
static factories (same name as the neutral base), JSON5-flavored
`putJson5(...)`.
- These are the drop-in replacement for callers that today rely on
`JsonMap.toString()` producing
JSON5 or on `new JsonMap("{unquoted:'json5'}")` parsing JSON5.
@@ -145,8 +146,8 @@ the v9.5 migration guide. The short version:
| Old behavior | New behavior | Recommended migration |
|---|---|---|
| `JsonMap.toString()` → JSON5 | strict JSON | Use `Json5Map` (or
`Json5.of(map)`) for JSON5 output. |
-| `new JsonMap("{unquoted:'json5'}")` parses JSON5 | parses strict JSON
(throws) | Use `new Json5Map(...)` / `Json5Map.ofText(...)`. |
-| `JsonMap.ofJson(text)` / `JsonList.ofJson(text)` / `Json5Map.ofJson5(text)`
/ `Json5List.ofJson5(text)` | `JsonMap.ofText(text)` / `JsonList.ofText(text)`
/ `Json5Map.ofText(text)` / `Json5List.ofText(text)` | Single-arg parse
factories renamed to `ofText(...)` for consistency with the neutral
`MarshalledMap.ofText(text, Parser)` base. No behavioral change — the subclass
single-arg form still uses the language-specific default parser. (Note:
`JsonList.ofJsonOrCdl(String)` and `Json5Lis [...]
+| `new JsonMap("{unquoted:'json5'}")` parses JSON5 | parses strict JSON
(throws) | Use `new Json5Map(...)` / `Json5Map.ofString(...)`. |
+| `JsonMap.ofJson(text)` / `JsonList.ofJson(text)` / `Json5Map.ofJson5(text)`
/ `Json5List.ofJson5(text)` | `JsonMap.ofString(text)` /
`JsonList.ofString(text)` / `Json5Map.ofString(text)` /
`Json5List.ofString(text)` | Single-arg parse factories are now named
`ofString(...)` for consistency with string-based parse APIs across map/list
types. `ofText(...)` is retained as a deprecated compatibility alias. No
behavioral change — the subclass single-arg form still uses the
language-specific [...]
| `Json5Parser.DEFAULT.parse(s, Object.class)` → `JsonMap` | → `Json5Map` |
Cast to `Json5Map`, or to neutral `MarshalledMap`, or pass `parser.parse(s,
JsonMap.class)`. |
| Other parsers' `parse(s, Object.class)` → `JsonMap` | → `MarshalledMap` |
Same fix options. |
| `import org.apache.juneau.collections.ResolvingJsonMap;` | `import
org.apache.juneau.collections.ResolvingMarshalledMap;` | Hard rename; update
imports and any `new ResolvingJsonMap(...)` constructor calls. |
@@ -159,6 +160,20 @@ Per-language flavored `XMap` / `XList` pairs for the
remaining marshallers (`Xml
land, parser sessions other than `JsonParserSession` / `Json5ParserSession`
produce the neutral
`MarshalledMap` / `MarshalledList`.
+#### MessagePack media type normalized to `application/msgpack`
+
+- `MsgPackSerializer` and `MsgPackParser` now use the RFC 6838-conforming
`application/msgpack` as the
+ canonical media type. The previous invalid `octal/msgpack` value (`octal` is
not a registered MIME
+ top-level type) has been replaced.
+- The serializer emits `Content-Type: application/msgpack` only, and
`MsgPackSerializer.DEFAULT
+ .getResponseContentType()` (and `getPrimaryMediaType()`) now return
`application/msgpack`.
+- For backward compatibility, both the serializer's `Accept` media-type list
and the parser's
+ `consumes` list retain `octal/msgpack` as an alias, so existing wire
payloads and clients that
+ still send `Content-Type: octal/msgpack` or `Accept: octal/msgpack` continue
to be matched and
+ decoded.
+- Updated the `RestClient.msgPack()` / `RestRequest.msgPack()` Javadoc to
document the new media-type
+ value sent on the `Accept` and `Content-Type` request headers.
+
### juneau-commons
### juneau-config
@@ -486,6 +501,89 @@ JSONL is included in `BasicUniversalConfig` by default, or
can be used standalon
See [JSONL Basics](/docs/topics/JsonlBasics) for full documentation.
+#### Server-Sent Events (SSE) Support
+
+Juneau now ships with a native serializer / parser for the
+[WHATWG Server-Sent
Events](https://html.spec.whatwg.org/multipage/server-sent-events.html)
+wire format (`text/event-stream`). SSE is the standard one-way push channel
used by browsers
+(`EventSource`) and most LLM streaming APIs (OpenAI, Anthropic, etc.) for
progress events, partial
+responses, and long-lived telemetry feeds.
+
+##### New Classes (in `org.apache.juneau.sse`)
+
+- **`SseEvent`** — bean carrying the four spec fields (`event`, `data`, `id`,
`retry`). The `data`
+ payload is a **pre-serialized** string — callers serialize their typed
payload through their
+ marshaller of choice (e.g. `Json.of(...)`) and assign the resulting string.
+- **`SseSerializer`** extends `WriterSerializer` — produces
`text/event-stream`. Accepts a single
+ `SseEvent`, an `Iterable`, a `Stream`, or an `SseEvent[]` array. Calls
`Writer.flush()` **after
+ every event** so events are pushed to the client immediately (essential for
server-push and AI
+ streaming).
+- **`SseParser`** extends `ReaderParser` — eager parse of a closed
`text/event-stream` into
+ `List<SseEvent>`, `SseEvent[]`, or a single `SseEvent`.
+- **`SseEventReader`** — public `Iterator<SseEvent>` + `Closeable` for
line-driven streaming over a
+ caller-owned `Reader`. The intended API for long-lived SSE streams that
outlive the standard
+ parser-session lifecycle.
+- **`Sse`** marshaller (in `org.apache.juneau.marshaller`) — convenience
pairing of
+ `SseSerializer` and `SseParser` with `of(...)` / `to(...)` shortcuts.
+
+##### Features
+
+- Full WHATWG parse-algorithm compliance: all three line terminators (`CR`,
`LF`, `CR LF`),
+ one-time UTF-8 BOM strip, `field:value` field splitting with optional-space
stripping after the
+ colon, multi-line `data:` concatenation, comment-line (`: heartbeat`)
skipping, and the
+ spec-defined ignore rules for `id` containing U+0000 and non-digit `retry`
values.
+- Per-event `Writer.flush()` inside `SseSerializerSession.doSerialize(...)` so
SSE actually works
+ as a push channel (without it, events would buffer and only land at
end-of-response).
+- `SseSerializer.writeComment(Writer, String)` helper for emitting SSE
heartbeat / keep-alive
+ comment lines on long-lived connections.
+
+##### Example
+
+```java
+// Serialize a list of events to SSE wire format
+List<SseEvent> events = List.of(
+ new SseEvent("progress", "step 1").setId("1"),
+ new SseEvent("progress", "step 2").setId("2")
+);
+String wire = Sse.of(events);
+// Produces:
+// event: progress
+// data: step 1
+// id: 1
+//
+// event: progress
+// data: step 2
+// id: 2
+//
+
+// Parse SSE wire format back into a list of events
+List<SseEvent> parsed = Sse.to(wire, List.class, SseEvent.class);
+```
+
+##### REST integration
+
+SSE is not added to `BasicUniversalConfig` (it's a streaming, one-way push
format with different
+semantics from the regular content-negotiation marshallers). Register it
explicitly per-endpoint:
+
+```java
+@Rest(serializers = SseSerializer.class)
+public class MyStreamResource {
+ @RestGet("/events")
+ public List<SseEvent> stream() {
+ return List.of(
+ new SseEvent("progress", "step 1"),
+ new SseEvent("progress", "step 2")
+ );
+ }
+}
+```
+
+##### Media Types
+
+- Produces / accepts: `text/event-stream`
+
+See [SSE Basics](/docs/topics/SseBasics) for full documentation.
+
#### BSON (Binary JSON) Support
Juneau now includes built-in BSON (Binary JSON) serialization and parsing
support, implemented without external library dependencies. BSON is the binary
serialization format used by MongoDB, extending JSON with typed integers
(int32/int64), native datetime, decimal128, and binary data.
@@ -1925,6 +2023,10 @@ If you previously relied on `@Bean` (inject) overriding
a Spring `@Bean`, you ha
The supplier is called at each read site (request creation, remote proxy
invocation, RRPC path building), so URL changes are always reflected on the
next request. No build-time URL validation is performed for the
`Supplier<String>` overload; invalid values will surface as errors when
requests are made.
+#### Bug Fixes
+
+- **Fixed stream-closed exception when calling
`RestResponse.getContent().asString()` after FULL request logging.**
`RestResponse.close()` previously called `EntityUtils.consumeQuietly(...)` on
the underlying HTTP entity *before* rendering FULL-detail log output. On real
(non-mock) responses the consume step closes the network input stream, so the
subsequent FULL-logging body read (and any later user call to
`getContent().asString()`) failed with `IOException: Stream closed`, leaving
`Re [...]
+
#### Migration Notes
- **RestClient `rootUrl`**: The `rootUrl` field is now stored as a
`Supplier<String>` internally. Code that relies on reflection to access the
private `rootUrl` field directly (unusual but possible) will now see a
`Supplier<String>` instead of a `String`.
@@ -2433,3 +2535,166 @@ The cursor receives the full descriptor list and the
inbound cursor token, and r
Requests without an `id` are treated as JSON-RPC notifications: handlers run,
exceptions are swallowed, and the dispatcher returns `null`. The REST servlet
writes an empty body so transports can map this to `204 No Content`.
See [juneau-rest-server-mcp](/docs/topics/JuneauRestServerMcpBasics) for the
full topic.
+
+### juneau-bean-rfc7807 (new module)
+
+A new bean module, `juneau-bean-rfc7807`, provides typed beans for [RFC 7807 —
Problem Details for HTTP APIs](https://www.rfc-editor.org/rfc/rfc7807)
(`application/problem+json`). RFC 7807 was obsoleted by [RFC
9457](https://www.rfc-editor.org/rfc/rfc9457) in July 2023, but the data model
and the IANA media-type registration are unchanged.
+
+The module ships a single `Problem` bean covering the five canonical members
defined in §3.1 (`type`, `title`, `status`, `detail`, `instance`) plus an
open-ended extension-member fan-out per §3.2. Only depends on `juneau-marshall`.
+
+#### Bean shape
+
+- `URI type` — nullable. `getType()` returns the raw value;
`getTypeOrDefault()` returns `URI.create("about:blank")` per §3.1 when unset
(without mutating the field).
+- `String title` — short human-readable summary of the problem type.
+- `Integer status` — OPTIONAL HTTP status code; serialized as a JSON number
when set, omitted when `null`.
+- `String detail` — human-readable explanation specific to this occurrence.
+- `URI instance` — URI identifying the specific occurrence.
+- Extension members (§3.2) flatten into the top-level JSON object via a
`@BeanProp("*")` triplet (`extraKeys()` / `get(String)` / `set(String,
Object)`) over a private `Map<String,Object>`.
+
+A single static factory, `Problem.fromStatus(int status, String title, String
detail)`, covers the common "build a problem from status code + title +
detail" call site. Callers wire from `BasicHttpException` themselves with
one line:
+
+```java
+Problem.fromStatus(e.getStatusCode(), e.getStatusLine().getReasonPhrase(),
e.getMessage());
+```
+
+The bean does not eagerly default the `type` field, so a fresh `new Problem()`
round-trips without a synthetic `"type":"about:blank"` on the wire.
+
+#### Example
+
+```java
+import org.apache.juneau.bean.rfc7807.*;
+import org.apache.juneau.json.*;
+
+Problem problem = new Problem()
+ .setType(new URI("https://example.com/probs/out-of-credit"))
+ .setTitle("You do not have enough credit.")
+ .setStatus(403)
+ .setDetail("Your current balance is 30, but that costs 50.")
+ .setInstance(new URI("/account/12345/msgs/abc"))
+ .set("balance", 30)
+ .set("accounts", List.of("/account/12345", "/account/67890"));
+
+String json = JsonSerializer.DEFAULT.serialize(problem);
+Problem back = JsonParser.DEFAULT.parse(json, Problem.class);
+```
+
+The matching `Content-Type` constants (`ContentType.APPLICATION_PROBLEM_JSON`
and `ContentType.APPLICATION_PROBLEM_XML`) have shipped in `juneau-rest-common`
since 9.2.x; this module closes the loop by adding the typed wire bean.
+
+See [juneau-bean-rfc7807](/docs/topics/JuneauBeanRfc7807) for the full topic.
+
+### juneau-bean-hal (new module)
+
+A new bean module, `juneau-bean-hal`, models the [HAL (Hypertext Application
Language)](https://stateless.group/hal_specification.html) hypermedia format
([draft-kelly-json-hal-08](https://datatracker.ietf.org/doc/html/draft-kelly-json-hal-08))
as Juneau `@Marshalled` POJOs. The beans round-trip cleanly through the
default `JsonSerializer` / `JsonParser` for `application/hal+json` payloads —
no custom marshaller required. Only depends on `juneau-marshall`. The matching
`Content-Type` con [...]
+
+#### Bean shape
+
+- **`HalResource`** — top-level HAL resource carrying the reserved `_links`
map (`Map<String,Object>` whose values are single `HalLink` or `HalLinkArray`),
the reserved `_embedded` map (`Map<String,Object>` whose values are single
`HalResource` or `HalResourceArray`), and an open-ended payload via the
`@BeanProp("*")` extra-properties triplet (`extraKeys()` / `get(String)` /
`set(String, Object)`).
+- **`HalLink`** — all eight Link Object fields per draft-kelly-json-hal-08:
`href` (required URI/URI-template), `templated`, `type`, `deprecation`, `name`,
`profile`, `title`, `hreflang`.
+- **`HalLinkArray`** — `LinkedList<HalLink>` used as the multi-link branch
inside an `_links` map. Mirrors the top-level-array pattern used by
`JsonSchemaArray`.
+- **`HalResourceArray`** — `LinkedList<HalResource>` used as the
multi-resource branch inside an `_embedded` map.
+- **`HalLinkOrArraySwap`** / **`HalResourceOrArraySwap`** — per-property
`ObjectSwap`s applied to `_links` / `_embedded` so each map entry round-trips
as either a single object or a JSON array per the spec.
+
+Convenience methods on `HalResource` make the spec's single-or-array shapes
ergonomic: `addLink(rel, link)` sets a single-link value; `addLinks(rel,
links...)` promotes the entry to a `HalLinkArray` (creating one or appending to
an existing array as needed). The same pattern is mirrored for `_embedded` via
`addEmbedded(rel, res)` / `addEmbedded(rel, res...)`.
+
+#### Example
+
+```java
+import org.apache.juneau.bean.hal.*;
+import org.apache.juneau.json.*;
+
+HalResource order = new HalResource()
+ .addLink("self", new HalLink("/orders/123"))
+ .addLinks("curies",
+ new
HalLink("https://acme.example/{rel}").setName("acme").setTemplated(true))
+ .set("currency", "USD")
+ .set("total", 99.50)
+ .addEmbedded("customer",
+ new HalResource()
+ .addLink("self", new HalLink("/customers/7"))
+ .set("name", "Kelsey"));
+
+String json = JsonSerializer.DEFAULT.serialize(order);
+HalResource back = JsonParser.DEFAULT.parse(json, HalResource.class);
+```
+
+See [juneau-bean-hal](/docs/topics/JuneauBeanHal) for the full topic.
+
+### juneau-bean-jsonapi (new module)
+
+A new bean module, `juneau-bean-jsonapi`, models the [JSON:API
v1.1](https://jsonapi.org/format/) wire format (`application/vnd.api+json`) as
Juneau `@Marshalled` POJOs. The beans round-trip cleanly through the default
`JsonSerializer` / `JsonParser` — no custom marshaller required. Only depends
on `juneau-marshall`. The matching `Content-Type` constant
(`ContentType.APPLICATION_VND_API_JSON`) has shipped in `juneau-rest-common`
since 9.2.x.
+
+#### Bean shape
+
+- **`JsonApiDocument`** — top-level container with `data`, `errors`, `meta`,
`jsonapi`, `links`, `included`. Includes a `validate()` helper that enforces
the document-level invariants: at least one of `data` / `errors` / `meta` must
be present, and `data` and `errors` MUST NOT coexist.
+- **`JsonApiResource`** — resource object with `type`, `id`, `attributes`,
`relationships`, `links`, `meta`. `type` is modeled as a plain `String` (and
**not** as a `@Marshalled(typePropertyName="type", dictionary=...)`
discriminator) because JSON:API `type` is an open-ended entity-type name chosen
by the API; turning it into a Juneau dispatch discriminator would break
round-tripping of unknown values and force every API to enumerate its resource
types in a Java dictionary up front.
+- **`JsonApiResourceIdentifier`** — slim `type`/`id`/`meta` form used inside
relationship linkage.
+- **`JsonApiRelationship`** — `data` linkage (`null`, single
`JsonApiResourceIdentifier`, or list of them), `links`, `meta`.
+- **`JsonApiError`** + **`JsonApiErrorSource`** — error object with `id`,
`links`, `status`, `code`, `title`, `detail`, `source`, `meta`; the `source`
sub-object carries `pointer`, `parameter`, `header`.
+- **`JsonApiLink`** — link object with `href`, `rel`, `describedby`, `title`,
`type`, `hreflang`, `meta`.
+- **`JsonApiVersion`** — the `jsonapi` member (`version`, `meta`).
+- **`JsonApiLinkOrStringSwap`** — per-property `ObjectSwap` applied to every
`links` map (on `JsonApiDocument`, `JsonApiResource`, `JsonApiRelationship`,
`JsonApiError`) so that each map entry round-trips as either a JSON string URL
or a `JsonApiLink` JSON object per the spec.
+
+#### Example
+
+```java
+import org.apache.juneau.bean.jsonapi.*;
+import org.apache.juneau.collections.*;
+import org.apache.juneau.json.*;
+
+JsonApiResource article = new JsonApiResource("articles", "1")
+ .setAttributes(JsonMap.of("title", "JSON:API paints my bikeshed!"))
+ .putRelationship("author",
+ new JsonApiRelationship().setData(new
JsonApiResourceIdentifier("people", "9")));
+JsonApiDocument doc = new JsonApiDocument()
+ .setJsonapi(new JsonApiVersion("1.1"))
+ .setData(article);
+
+String json = JsonSerializer.DEFAULT.serialize(doc);
+JsonApiDocument back = JsonParser.DEFAULT.parse(json, JsonApiDocument.class);
+```
+
+See [juneau-bean-jsonapi](/docs/topics/JuneauBeanJsonApi) for the full topic.
+
+### juneau-bean-jsonpatch (new module)
+
+A new bean module, `juneau-bean-jsonpatch`, models [JSON Patch (RFC
6902)](https://datatracker.ietf.org/doc/html/rfc6902) operation documents
(`application/json-patch+json`) as Juneau `@Marshalled` POJOs with polymorphic
dispatch on the `op` discriminator. Only depends on `juneau-marshall`. The
matching `Content-Type` constant (`ContentType.APPLICATION_JSON_PATCH`) has
shipped in `juneau-rest-common` since 9.2.x.
+
+#### Bean shape
+
+- **`JsonPatchOperation`** — abstract base carrying the shared `path` (JSON
Pointer / RFC 6901) field. Annotated `@Marshalled(typePropertyName="op",
dictionary={AddOp, RemoveOp, ReplaceOp, MoveOp, CopyOp, TestOp})` so the parser
materializes the correct concrete subclass keyed off the `op` member. Kept open
(not `sealed`) so downstream callers can extend the dictionary with custom ops.
+- **`AddOp`**, **`RemoveOp`**, **`ReplaceOp`**, **`MoveOp`**, **`CopyOp`**,
**`TestOp`** — the six standard operations from §4. `add`/`replace`/`test`
carry a `value` payload (`Object`); `move`/`copy` carry a `from` JSON Pointer;
`remove` has no extra members.
+- **`JsonPatch`** — `LinkedList<JsonPatchOperation>` representing a JSON Patch
document, which serializes as a top-level JSON array per the RFC. Mirrors the
`JsonSchemaArray` top-level-array pattern (rather than
`@Json(wrapperAttr=...)`).
+
+#### Polymorphic Serialization
+
+`JsonPatchOperation` uses `@Marshalled(typePropertyName="op",
dictionary={...})` to discriminate at the wire level. Configure your serializer
with `addBeanTypes()` to emit the discriminator on output:
+
+```java
+JsonSerializer ser = JsonSerializer.create()
+ .addBeanTypes()
+ .typePropertyName(JsonPatchOperation.class, "op")
+ .build();
+
+JsonParser par = JsonParser.create()
+ .typePropertyName(JsonPatchOperation.class, "op")
+ .build();
+```
+
+#### Example
+
+```java
+import org.apache.juneau.bean.jsonpatch.*;
+
+JsonPatch patch = new JsonPatch()
+ .append(new TestOp("/a/b/c", "foo"))
+ .append(new RemoveOp("/a/b/c"))
+ .append(new AddOp("/a/b/c", java.util.List.of("foo", "bar")))
+ .append(new ReplaceOp("/a/b/c", 42))
+ .append(new MoveOp("/a/b/d", "/a/b/c"))
+ .append(new CopyOp("/a/b/e", "/a/b/d"));
+
+String wire = ser.serialize(patch);
+JsonPatch back = par.parse(wire, JsonPatch.class);
+```
+
+See [juneau-bean-jsonpatch](/docs/topics/JuneauBeanJsonPatch) for the full
topic.
diff --git a/pages/topics/01.02.Marshalling.md
b/pages/topics/01.02.Marshalling.md
index 6139de3902..3a435ebb4e 100644
--- a/pages/topics/01.02.Marshalling.md
+++ b/pages/topics/01.02.Marshalling.md
@@ -410,8 +410,8 @@ String myMap =
Json5Map.create().append("foo","bar").toJson5();
String myList = Json5List.of("foo", 123, null, jsonObject).toJson5();
// Parse directly from JSON5 into generic DOMs.
-Map myMap = Json5Map.ofText("{foo:'bar'}");
-List myList = Json5List.ofText("['foo',123,null]");
+Map myMap = Json5Map.ofString("{foo:'bar'}");
+List myList = Json5List.ofString("['foo',123,null]");
```
Both pairs sit on top of a new neutral <a
href="/site/apidocs/org/apache/juneau/collections/MarshalledMap.html"
target="_blank">MarshalledMap</a> / <a
href="/site/apidocs/org/apache/juneau/collections/MarshalledList.html"
target="_blank">MarshalledList</a> base introduced in v9.5; <a
href="/site/apidocs/org/apache/juneau/collections/JsonMap.html"
target="_blank">JsonMap</a> / <a
href="/site/apidocs/org/apache/juneau/collections/JsonList.html"
target="_blank">JsonList</a> carry the strict [...]
diff --git a/pages/topics/02.23.ObjectTools.md
b/pages/topics/02.23.ObjectTools.md
index 52c3eb0967..c0c7addee5 100644
--- a/pages/topics/02.23.ObjectTools.md
+++ b/pages/topics/02.23.ObjectTools.md
@@ -42,7 +42,7 @@ Leaves of the tree can be any type of object.
:::tip Example
```java
// Construct an unstructured POJO model
-JsonMap map = JsonMap.ofText(""
+JsonMap map = JsonMap.ofString(""
+ "{"
+ " name:'John Smith', "
+ " address:{ "
@@ -91,7 +91,7 @@ johnSmith.post("phoneNumbers", "212 555-3333");
johnSmith.delete("fico score");
// Add entirely new structures to the tree
-JsonMap medicalInfo = JsonMap.ofText(""
+JsonMap medicalInfo = JsonMap.ofString(""
+ "{"
+ " currentStatus: 'deceased',"
+ " health: 'non-existent',"
diff --git a/pages/topics/02.31.01.MessagePackBasics.md
b/pages/topics/02.31.01.MessagePackBasics.md
index 37a5813be8..e1a44fd27e 100644
--- a/pages/topics/02.31.01.MessagePackBasics.md
+++ b/pages/topics/02.31.01.MessagePackBasics.md
@@ -7,3 +7,10 @@ Juneau supports converting arbitrary POJOs to and from
MessagePack using ultra-e
MessagePack is a compact binary form of JSON.
The serialization support for MessagePack mirrors that of JSON.
+
+## Media types
+
+The serializer emits `Content-Type: application/msgpack` (the RFC
6838-conforming value, matching the constant
+`org.apache.juneau.http.header.ContentType.APPLICATION_MSGPACK`).
+The parser accepts both `application/msgpack` and the legacy `octal/msgpack`
value as a backward-compatibility
+alias, so payloads produced by earlier Juneau releases continue to decode
without changes.
diff --git a/pages/topics/02.43.01.SseBasics.md
b/pages/topics/02.43.01.SseBasics.md
new file mode 100644
index 0000000000..e40d8a2eb8
--- /dev/null
+++ b/pages/topics/02.43.01.SseBasics.md
@@ -0,0 +1,174 @@
+---
+title: "SSE Basics"
+slug: SseBasics
+---
+
+Juneau supports the [Server-Sent Events
(SSE)](https://html.spec.whatwg.org/multipage/server-sent-events.html)
+wire format (`text/event-stream`) via native serializer and parser
implementations under
+`org.apache.juneau.sse`. SSE is the one-way push channel used by browsers
(`EventSource`) and
+most LLM streaming APIs (OpenAI, Anthropic, etc.) for progress events, partial
responses,
+heartbeats, and other long-lived telemetry feeds.
+
+The <a href="/site/apidocs/org/apache/juneau/sse/SseSerializer.html"
target="_blank">SseSerializer</a>
+emits one wire event per element with a `Writer.flush()` after each one — that
flush is what
+makes SSE actually push events to the client immediately rather than buffer
them until the end
+of the response. The <a
href="/site/apidocs/org/apache/juneau/sse/SseParser.html"
target="_blank">SseParser</a>
+provides an eager parse path that drains a closed stream into a
`List<SseEvent>`. For long-lived
+streams that outlive a normal parser-session lifecycle, use the
+<a href="/site/apidocs/org/apache/juneau/sse/SseEventReader.html"
target="_blank">SseEventReader</a>
+iterator directly.
+
+##### Maven Dependency
+
+SSE support is included in `juneau-marshall`:
+
+```xml
+<dependency>
+ <groupId>org.apache.juneau</groupId>
+ <artifactId>juneau-marshall</artifactId>
+ <version>${juneau.version}</version>
+</dependency>
+```
+
+##### The `SseEvent` bean
+
+`SseEvent` carries the four spec-defined fields:
+
+| Field | Type | Purpose |
+|---|---|---|
+| `event` | `String` | Event-type name. When absent, the WHATWG `EventSource`
dispatches as `"message"`. |
+| `data` | `String` | The payload, **pre-serialized**. Embedded `\n` causes
the wire to emit multiple `data:` lines. |
+| `id` | `String` | Last-event-id, used for resumability. |
+| `retry` | `Long` | Reconnect-delay hint in milliseconds. |
+
+The `data` field is intentionally a pre-serialized string — Juneau's SSE
marshaller does not
+compose with a delegate marshaller. Callers serialize their typed payload
through whichever
+marshaller they prefer and assign the resulting string:
+
+```java
+SseEvent event = new SseEvent()
+ .setEvent("progress")
+ .setData(Json.of(Map.of("step", 4, "total", 10)))
+ .setId("42")
+ .setRetry(5000L);
+```
+
+##### Quick Start — Serializing
+
+```java
+List<SseEvent> events = List.of(
+ new SseEvent("progress", "step 1").setId("1"),
+ new SseEvent("progress", "step 2").setId("2"),
+ new SseEvent("progress", "step 3").setId("3")
+);
+
+String wire = Sse.of(events);
+```
+
+Produces:
+
+```
+event: progress
+data: step 1
+id: 1
+
+event: progress
+data: step 2
+id: 2
+
+event: progress
+data: step 3
+id: 3
+
+```
+
+##### Quick Start — Parsing
+
+```java
+// Eager parse into a List<SseEvent> (good for one-shot reads and tests).
+List<SseEvent> parsed = Sse.to(wire, List.class, SseEvent.class);
+
+// Single-event target — returns the first event in the stream.
+SseEvent first = Sse.to(wire, SseEvent.class);
+
+// Array target.
+SseEvent[] arr = Sse.to(wire, SseEvent[].class);
+```
+
+For long-lived streams (the typical SSE use case), drive the parser iterator
directly so the
+underlying `Reader` stays open until you close it:
+
+```java
+try (SseEventReader r = new SseEventReader(responseReader)) {
+ while (r.hasNext()) {
+ SseEvent e = r.next();
+ // dispatch...
+ }
+}
+```
+
+##### REST Integration
+
+SSE is **not** included in `BasicUniversalConfig` — it's a streaming push
format with very
+different semantics from the standard content-negotiation marshallers
(long-lived response, no
+content length, per-event flush). Register it explicitly on the resource that
needs it:
+
+```java
+@Rest(serializers = SseSerializer.class)
+public class MyStreamResource {
+
+ @RestGet("/events")
+ public List<SseEvent> stream() {
+ return List.of(
+ new SseEvent("progress", "step 1"),
+ new SseEvent("progress", "step 2")
+ );
+ }
+}
+```
+
+Per-event flush works through the standard `SerializedPojoProcessor` path —
`SseSerializerSession`
+calls `Writer.flush()` after each event so the servlet container pushes the
wire bytes immediately
+without waiting for the response to complete.
+
+##### Comment / heartbeat lines
+
+Many HTTP intermediaries (proxies, load balancers) close idle connections
after some timeout.
+Use `SseSerializer.writeComment(Writer, String)` to emit an SSE comment line
every 15–30 s
+on long-lived streams to keep the socket alive:
+
+```java
+SseSerializer.writeComment(responseWriter, "ping");
+```
+
+Produces:
+
+```
+: ping
+
+```
+
+##### WHATWG Spec Compliance
+
+The parser implements the full WHATWG parse algorithm:
+
+- All three line terminators: `CR`, `LF`, `CR LF`.
+- One-time UTF-8 BOM strip on the first character of the stream.
+- Optional single space stripped after the field colon (`data: hello` and
`data:hello` parse the same).
+- Multi-line `data:` accumulation, joined with `\n` on dispatch.
+- Comment lines (lines starting with `:`) are skipped.
+- Lines with no colon treated as a field name with empty value.
+- `id` values containing U+0000 NULL are ignored.
+- `retry` values that aren't ASCII-digit integers are ignored.
+
+##### Media Types
+
+- **Produces**: `text/event-stream`
+- **Accepts**: `text/event-stream`
+
+:::info See Also
+
+- [WHATWG HTML §9.2 — Server-sent
events](https://html.spec.whatwg.org/multipage/server-sent-events.html) for the
full wire-format spec.
+- [Marshallers](/docs/topics/Marshalling) for the marshaller API overview.
+
+:::
diff --git a/pages/topics/04.09.JuneauBeanRfc7807.md
b/pages/topics/04.09.JuneauBeanRfc7807.md
new file mode 100644
index 0000000000..951465447f
--- /dev/null
+++ b/pages/topics/04.09.JuneauBeanRfc7807.md
@@ -0,0 +1,132 @@
+---
+title: "juneau-bean-rfc7807"
+slug: JuneauBeanRfc7807
+---
+
+# juneau-bean-rfc7807
+
+The `juneau-bean-rfc7807` module provides Java beans for [RFC 7807 — Problem
Details for HTTP APIs](https://www.rfc-editor.org/rfc/rfc7807), the canonical
machine-readable error format used by `application/problem+json`.
+
+## Overview
+
+RFC 7807 standardises a five-field JSON document for carrying HTTP error
details. Most modern REST stacks ship a `ProblemDetail`-style bean out of the
box (Spring's `ProblemDetail`, ASP.NET's `ProblemDetails`, etc.); this module
brings the same to Juneau as a typed `@Marshalled` POJO that round-trips
through any Juneau serializer or parser.
+
+RFC 7807 was obsoleted by [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457)
in July 2023, but the data model and the `application/problem+json` IANA
registration are unchanged. The module name keeps the historical RFC reference
to match the existing `ContentType.APPLICATION_PROBLEM_JSON` constant lineage.
+
+### Key Features
+
+- **Single `Problem` bean** — Covers the five canonical members in §3.1 plus
open-ended extension members in §3.2.
+- **Lazy `type` default** — `getType()` returns the raw nullable value;
`getTypeOrDefault()` returns the spec default `"about:blank"` per §3.1 when the
field is unset, without mutating the bean or polluting the wire output.
+- **Extension members flatten** — Arbitrary §3.2 extension members appear at
the top level of the JSON via a `@BeanProp("*")` triplet over a private
`Map<String,Object>`.
+- **Fluent setters** — Every setter returns `this` for ergonomic chaining.
+- **No external dependencies** — Only depends on `juneau-marshall`.
+
+## The `Problem` Bean
+
+| Property | Type | Notes
|
+|------------|-----------|------------------------------------------------------------------------------------|
+| `type` | `URI` | Nullable. `getType()` returns raw value;
`getTypeOrDefault()` returns `about:blank`. |
+| `title` | `String` | Short, human-readable summary of the problem type.
|
+| `status` | `Integer` | OPTIONAL HTTP status code. Serialized as a JSON
number; omitted when `null`. |
+| `detail` | `String` | Human-readable explanation specific to this
occurrence. |
+| `instance` | `URI` | URI that identifies the specific occurrence of the
problem. |
+| (extras) | varies | Arbitrary §3.2 extension members; serialise flat at
the top level. |
+
+### Static factory
+
+A single convenience factory covers the common "build a problem from a
status code + title + detail" call site:
+
+```java
+Problem p = Problem.fromStatus(404, "Not Found", "Resource missing");
+```
+
+Callers bridge from `BasicHttpException` (or any other exception type)
themselves in one line, keeping the bean module free of an outbound dep on
`juneau-rest-common`:
+
+```java
+Problem p = Problem.fromStatus(
+ e.getStatusCode(),
+ e.getStatusLine().getReasonPhrase(),
+ e.getMessage()
+);
+```
+
+## Basic Usage
+
+### Building a problem document
+
+```java
+import org.apache.juneau.bean.rfc7807.*;
+import org.apache.juneau.json.*;
+
+Problem problem = new Problem()
+ .setType(new URI("https://example.com/probs/out-of-credit"))
+ .setTitle("You do not have enough credit.")
+ .setStatus(403)
+ .setDetail("Your current balance is 30, but that costs 50.")
+ .setInstance(new URI("/account/12345/msgs/abc"))
+ .set("balance", 30)
+ .set("accounts", List.of("/account/12345", "/account/67890"));
+
+String wire = JsonSerializer.DEFAULT.serialize(problem);
+Problem back = JsonParser.DEFAULT.parse(wire, Problem.class);
+```
+
+Produces:
+
+```json
+{
+ "detail": "Your current balance is 30, but that costs 50.",
+ "instance": "/account/12345/msgs/abc",
+ "status": 403,
+ "title": "You do not have enough credit.",
+ "type": "https://example.com/probs/out-of-credit",
+ "balance": 30,
+ "accounts": ["/account/12345", "/account/67890"]
+}
+```
+
+### The `type` default
+
+RFC 7807 §3.1 says an absent `type` member is equivalent to the URI
`"about:blank"`. The `Problem` bean models this **lazily**: the field stays
`null` when unset, so a fresh bean round-trips without a synthetic
`"type":"about:blank"` on the wire. Callers who need the spec default applied
use the separate `getTypeOrDefault()` accessor:
+
+```java
+Problem p = new Problem();
+p.getType(); // returns null
+p.getTypeOrDefault(); // returns URI.create("about:blank")
+JsonSerializer.DEFAULT.serialize(p); // "{}", no "type" member
+```
+
+### Extension members
+
+Arbitrary §3.2 extension members are added via `set(String, Object)` and read
back via `get(String)` or `extraKeys()`. They are serialised flat into the
top-level object — not nested under any `extensions` key.
+
+```java
+Problem p = new Problem()
+ .setTitle("Validation failed")
+ .set("invalidParams", List.of("name", "age"));
+
+// Wire: {"invalidParams":["name","age"],"title":"Validation failed"}
+
+Problem parsed = JsonParser.DEFAULT.parse(wire, Problem.class);
+parsed.get("invalidParams"); // List<String> ["name", "age"]
+parsed.extraKeys(); // Set<String> {"invalidParams"}
+```
+
+## Content-Type
+
+The matching `Content-Type` constants live in `juneau-rest-common` and have
been available since 9.2.x:
+
+```java
+import org.apache.juneau.http.header.ContentType;
+
+ContentType.APPLICATION_PROBLEM_JSON; // "application/problem+json"
+ContentType.APPLICATION_PROBLEM_XML; // "application/problem+xml"
+```
+
+This module supplies the `application/problem+json` bean;
`application/problem+xml` is not yet covered.
+
+## Resources
+
+- [RFC 7807 — Problem Details for HTTP
APIs](https://www.rfc-editor.org/rfc/rfc7807)
+- [RFC 9457 — Problem Details for HTTP APIs (obsoletes
7807)](https://www.rfc-editor.org/rfc/rfc9457)
+- [IANA `application/problem+json`
registration](https://www.iana.org/assignments/media-types/application/problem+json)
diff --git a/pages/topics/04.10.JuneauBeanHal.md
b/pages/topics/04.10.JuneauBeanHal.md
new file mode 100644
index 0000000000..413a46ca47
--- /dev/null
+++ b/pages/topics/04.10.JuneauBeanHal.md
@@ -0,0 +1,108 @@
+---
+title: "juneau-bean-hal"
+slug: JuneauBeanHal
+---
+
+# juneau-bean-hal
+
+The `juneau-bean-hal` module provides Java beans for the [HAL (Hypertext
Application Language)](https://stateless.group/hal_specification.html)
hypermedia format, also described in
[draft-kelly-json-hal-08](https://datatracker.ietf.org/doc/html/draft-kelly-json-hal-08).
HAL is a JSON-based wire format that lets a REST API describe its resources
alongside the links and embedded sub-resources that surround them.
+
+## Overview
+
+HAL standardises two reserved members on every resource: `_links` (a map of
relation name to one or more `HalLink` objects) and `_embedded` (a map of
relation name to one or more sub-resources). Everything else in the object is
the resource's own payload. This module brings that wire format to Juneau as
typed `@Marshalled` POJOs that round-trip through the default `JsonSerializer`
/ `JsonParser` — no custom marshaller required.
+
+### Key Features
+
+- **Typed beans for the full HAL spec** — `HalResource`, `HalLink`,
`HalLinkArray`, `HalResourceArray`, with all eight Link Object fields per
draft-kelly-json-hal-08.
+- **Spec-correct single-or-array handling** — `_links` and `_embedded` map
values can be either a single object or a JSON array per the spec. Per-property
`ObjectSwap`s (`HalLinkOrArraySwap` / `HalResourceOrArraySwap`) handle the
union both directions.
+- **Open-ended payload via `@BeanProp("*")`** — Arbitrary resource fields are
added via `set(String, Object)` and read back via `get(String)` /
`extraKeys()`. They serialise flat at the top level alongside `_links` and
`_embedded`.
+- **Fluent ergonomics for the single-or-array shapes** — `addLink(rel, link)`
sets a single-link entry; `addLinks(rel, links...)` promotes the entry to a
`HalLinkArray` (creating one or extending an existing array as needed). Same
pattern is mirrored for `_embedded`.
+- **No external dependencies** — Only depends on `juneau-marshall`.
+
+## Bean Classes
+
+| Class | Notes |
+|---|---|
+| `HalResource` | Top-level HAL resource. Reserved `_links` and `_embedded`
maps + open payload. |
+| `HalLink` | Link Object with `href`, `templated`, `type`, `deprecation`,
`name`, `profile`, `title`, `hreflang`. |
+| `HalLinkArray` | `LinkedList<HalLink>` — multi-link branch inside an
`_links` map. |
+| `HalResourceArray` | `LinkedList<HalResource>` — multi-resource branch
inside an `_embedded` map. |
+| `HalLinkOrArraySwap` | Per-property `ObjectSwap` resolving each `_links`
value to single `HalLink` or `HalLinkArray`. |
+| `HalResourceOrArraySwap` | Per-property `ObjectSwap` resolving each
`_embedded` value to single `HalResource` or `HalResourceArray`. |
+
+## Basic Usage
+
+### Building a HAL resource
+
+```java
+import org.apache.juneau.bean.hal.*;
+import org.apache.juneau.json.*;
+
+HalResource order = new HalResource()
+ .addLink("self", new HalLink("/orders/123"))
+ .addLink("warehouse", new HalLink("/warehouse/56"))
+ .addLink("invoice", new HalLink("/invoices/873"))
+ .addLinks("curies",
+ new
HalLink("https://acme.example/{rel}").setName("acme").setTemplated(true))
+ .set("currency", "USD")
+ .set("status", "shipped")
+ .set("total", 30.00)
+ .addEmbedded("customer",
+ new HalResource()
+ .addLink("self", new HalLink("/customers/7"))
+ .set("name", "Kelsey"));
+
+String wire = JsonSerializer.DEFAULT.serialize(order);
+HalResource back = JsonParser.DEFAULT.parse(wire, HalResource.class);
+```
+
+### Single-link vs. link-array
+
+HAL allows a relation in `_links` to map to either a single Link Object or an
array of them. The convenience methods make the choice explicit at the call
site:
+
+- `addLink(rel, link)` — sets a single-link value at `rel`, replacing any
existing value.
+- `addLinks(rel, links...)` — promotes the entry under `rel` to a
`HalLinkArray`. If the existing value is a single `HalLink`, it is wrapped into
a new array; if it is already an array, the new links are appended; if absent,
a fresh array is created.
+
+```java
+HalResource r = new HalResource()
+ .addLink("self", new HalLink("/orders/123")) //
_links.self ⇒ object
+ .addLinks("curies",
+ new
HalLink("https://acme.example/{rel}").setName("acme").setTemplated(true),
+ new
HalLink("https://acme.example/v2/{rel}").setName("acme2").setTemplated(true)
+ ); //
_links.curies ⇒ array
+```
+
+The same pattern is mirrored on `_embedded` via `addEmbedded(rel, res)` and
`addEmbedded(rel, res...)`. The `HalLinkOrArraySwap` / `HalResourceOrArraySwap`
swaps make both wire shapes round-trip cleanly through the default JSON parser.
+
+### Open payload via `@BeanProp("*")`
+
+Arbitrary resource fields are added via `set(String, Object)` and read back
via `get(String)` / `extraKeys()`. They serialise flat into the top-level
object, alongside (and not nested under) `_links` and `_embedded`.
+
+```java
+HalResource r = new HalResource()
+ .addLink("self", new HalLink("/orders/123"))
+ .set("total", 99.50)
+ .set("currency", "USD");
+
+// {"_links":{"self":{"href":"/orders/123"}},"total":99.5,"currency":"USD"}
+```
+
+### `_embedded` is a tree, not a graph
+
+Per the spec, `_embedded` represents tree-shaped containment, not arbitrary
graphs. Juneau's `BeanTraverseContext` throws on cyclic object references by
default — which is the right behaviour here, so leave it on.
+
+## Content-Type
+
+The matching `Content-Type` constant lives in `juneau-rest-common` and has
been available since 9.2.x:
+
+```java
+import org.apache.juneau.http.header.ContentType;
+
+ContentType.APPLICATION_HAL_JSON; // "application/hal+json"
+```
+
+## Resources
+
+- [HAL specification (Mike
Kelly)](https://stateless.group/hal_specification.html)
+-
[draft-kelly-json-hal-08](https://datatracker.ietf.org/doc/html/draft-kelly-json-hal-08)
+- [IANA `application/hal+json`
registration](https://www.iana.org/assignments/media-types/application/hal+json)
diff --git a/pages/topics/04.11.JuneauBeanJsonApi.md
b/pages/topics/04.11.JuneauBeanJsonApi.md
new file mode 100644
index 0000000000..6d5ae23596
--- /dev/null
+++ b/pages/topics/04.11.JuneauBeanJsonApi.md
@@ -0,0 +1,139 @@
+---
+title: "juneau-bean-jsonapi"
+slug: JuneauBeanJsonApi
+---
+
+# juneau-bean-jsonapi
+
+The `juneau-bean-jsonapi` module provides Java beans for the [JSON:API
v1.1](https://jsonapi.org/format/) wire format, used by APIs that serve
`application/vnd.api+json`. JSON:API standardises a document shape, resource
objects, relationships, errors, and link semantics so clients and servers can
interoperate without ad-hoc per-API conventions.
+
+## Overview
+
+This module models the JSON:API wire format as typed `@Marshalled` POJOs that
round-trip through the default `JsonSerializer` / `JsonParser` — no custom
marshaller required. The bean shapes mirror the spec one-for-one, including the
document-level mutual-exclusion rule between `data` and `errors` and the
per-spec union types on `data` and `links`.
+
+### Key Features
+
+- **Full spec coverage** — Document, resource, resource identifier,
relationship, error, error source, link, and the `jsonapi` version object.
+- **Document-level invariants** — A `validate()` helper enforces the spec rule
that a document MUST contain at least one of `data` / `errors` / `meta`, and
that `data` and `errors` MUST NOT coexist.
+- **Polymorphic `data` member** — Top-level `data` can be `null`, a single
`JsonApiResource`, or a list of them; modelled as `Object` with typed setter
overloads.
+- **String-or-link map values** — Every `links` map (on `JsonApiDocument`,
`JsonApiResource`, `JsonApiRelationship`, `JsonApiError`) accepts either a JSON
string URL or a `JsonApiLink` JSON object per the spec, via the
`JsonApiLinkOrStringSwap` `ObjectSwap`.
+- **No external dependencies** — Only depends on `juneau-marshall`.
+
+## Bean Classes
+
+| Class | Spec members |
+|---|---|
+| `JsonApiDocument` | `data`, `errors`, `meta`, `jsonapi`, `links`, `included`
|
+| `JsonApiResource` | `type`, `id`, `attributes`, `relationships`, `links`,
`meta` |
+| `JsonApiResourceIdentifier` | `type`, `id`, `meta` |
+| `JsonApiRelationship` | `data` (linkage), `links`, `meta` |
+| `JsonApiError` | `id`, `links`, `status`, `code`, `title`, `detail`,
`source`, `meta` |
+| `JsonApiErrorSource` | `pointer`, `parameter`, `header` |
+| `JsonApiLink` | `href`, `rel`, `describedby`, `title`, `type`, `hreflang`,
`meta` |
+| `JsonApiVersion` | `version`, `meta` (the `jsonapi` member) |
+| `JsonApiLinkOrStringSwap` | Per-property swap applied to every `links` map |
+
+## Why `JsonApiResource.type` is a plain `String`
+
+JSON:API uses `type` on a resource object as an open-ended entity-type string
(`"articles"`, `"people"`, etc.) chosen by the API — not as a closed Java class
hierarchy. The Juneau bean intentionally models `type` as a plain `String` and
is **not** annotated with `@Marshalled(typePropertyName="type",
dictionary=...)`. Conflating JSON:API resource typing with Juneau bean dispatch
would:
+
+1. Break round-tripping of any `type` value the JVM doesn't know about up
front, and
+2. Force every API to enumerate its resource types in a Java dictionary at
compile time.
+
+If you want a per-API typed resource hierarchy, build one on top of
`JsonApiResource` in your application code rather than baking it into the wire
bean.
+
+## Basic Usage
+
+### Building a single-resource document
+
+```java
+import org.apache.juneau.bean.jsonapi.*;
+import org.apache.juneau.collections.*;
+import org.apache.juneau.json.*;
+
+JsonApiResource article = new JsonApiResource("articles", "1")
+ .setAttributes(JsonMap.of("title", "JSON:API paints my bikeshed!"))
+ .putRelationship("author",
+ new JsonApiRelationship().setData(new
JsonApiResourceIdentifier("people", "9")));
+
+JsonApiDocument doc = new JsonApiDocument()
+ .setJsonapi(new JsonApiVersion("1.1"))
+ .setData(article);
+
+String wire = JsonSerializer.DEFAULT.serialize(doc);
+JsonApiDocument back = JsonParser.DEFAULT.parse(wire, JsonApiDocument.class);
+```
+
+### Compound document with `included`
+
+```java
+JsonApiResource author = new JsonApiResource("people", "9")
+ .setAttributes(JsonMap.of("firstName", "Dan", "lastName", "Gebhardt"));
+JsonApiResource comment1 = new JsonApiResource("comments", "5")
+ .setAttributes(JsonMap.of("body", "First!"));
+JsonApiResource comment2 = new JsonApiResource("comments", "12")
+ .setAttributes(JsonMap.of("body", "I like XML better"));
+
+JsonApiResource article = new JsonApiResource("articles", "1")
+ .setAttributes(JsonMap.of("title", "JSON:API paints my bikeshed!"))
+ .putRelationship("author",
+ new JsonApiRelationship().setData(new
JsonApiResourceIdentifier("people", "9")))
+ .putRelationship("comments",
+ new JsonApiRelationship().setData(java.util.List.of(
+ new JsonApiResourceIdentifier("comments", "5"),
+ new JsonApiResourceIdentifier("comments", "12"))));
+
+JsonApiDocument doc = new JsonApiDocument()
+ .setJsonapi(new JsonApiVersion("1.1"))
+ .setData(article)
+ .addIncluded(author, comment1, comment2);
+```
+
+### String-or-link values inside a `links` map
+
+Every `links` map accepts both shapes the spec allows. The
`JsonApiLinkOrStringSwap` walks the map on parse and converts each JSON-object
value to a `JsonApiLink`, leaving string values as `String`. On serialize,
`String` values come out as JSON strings and `JsonApiLink` values come out as
JSON objects.
+
+```java
+JsonApiRelationship rel = new JsonApiRelationship()
+ .setLinks(new java.util.LinkedHashMap<>(java.util.Map.of(
+ "self", "/articles/1/relationships/author",
// string URL
+ "related", new JsonApiLink("/articles/1/author").setTitle("Author")
// full link object
+ )));
+```
+
+### Error documents
+
+```java
+JsonApiDocument doc = new JsonApiDocument().addErrors(
+ new JsonApiError()
+ .setStatus("422")
+ .setTitle("Invalid Attribute")
+ .setDetail("Title must contain at least three characters.")
+ .setSource(new
JsonApiErrorSource().setPointer("/data/attributes/title"))
+);
+```
+
+### `validate()`
+
+```java
+JsonApiDocument doc = new JsonApiDocument();
+doc.validate(); // throws IllegalStateException: at least one of
data/errors/meta required
+
+doc.setData(article).addErrors(new JsonApiError());
+doc.validate(); // throws IllegalStateException: data and errors must not
coexist
+```
+
+## Content-Type
+
+The matching `Content-Type` constant lives in `juneau-rest-common` and has
been available since 9.2.x:
+
+```java
+import org.apache.juneau.http.header.ContentType;
+
+ContentType.APPLICATION_VND_API_JSON; // "application/vnd.api+json"
+```
+
+## Resources
+
+- [JSON:API v1.1 specification](https://jsonapi.org/format/)
+- [IANA `application/vnd.api+json`
registration](https://www.iana.org/assignments/media-types/application/vnd.api+json)
diff --git a/pages/topics/04.12.JuneauBeanJsonPatch.md
b/pages/topics/04.12.JuneauBeanJsonPatch.md
new file mode 100644
index 0000000000..67096ebecc
--- /dev/null
+++ b/pages/topics/04.12.JuneauBeanJsonPatch.md
@@ -0,0 +1,117 @@
+---
+title: "juneau-bean-jsonpatch"
+slug: JuneauBeanJsonPatch
+---
+
+# juneau-bean-jsonpatch
+
+The `juneau-bean-jsonpatch` module provides Java beans for [JSON Patch (RFC
6902)](https://datatracker.ietf.org/doc/html/rfc6902), the canonical patch
document format used by `application/json-patch+json`. A JSON Patch document is
a JSON array of operation objects describing changes (add, remove, replace,
move, copy, test) to apply to a target JSON document.
+
+## Overview
+
+This module models the JSON Patch wire format as typed `@Marshalled` POJOs
with polymorphic dispatch on the spec's `op` discriminator. The beans
round-trip through `JsonSerializer` / `JsonParser` once the parser is told to
read the discriminator from the `op` member.
+
+### Key Features
+
+- **Abstract `JsonPatchOperation` base** — Carries the shared `path` field
(JSON Pointer per [RFC 6901](https://datatracker.ietf.org/doc/html/rfc6901))
and the `@Marshalled(typePropertyName="op", dictionary={...})` discriminator
wiring.
+- **Six concrete subclasses** — `AddOp`, `RemoveOp`, `ReplaceOp`, `MoveOp`,
`CopyOp`, `TestOp` — each annotated with the matching
`@Marshalled(typeName=...)` value.
+- **Top-level array via `extends LinkedList`** — `JsonPatch` extends
`LinkedList<JsonPatchOperation>` so the document serialises as a top-level JSON
array per the RFC (no `@Json(wrapperAttr=...)` wrapping). Mirrors the pattern
used by `JsonSchemaArray`.
+- **Open for extension** — `JsonPatchOperation` is `abstract`, not `sealed`,
so downstream callers can extend the dictionary with custom ops
(vendor-specific test operators, JSON Patch extensions, etc.).
+- **No external dependencies** — Only depends on `juneau-marshall`.
+
+## Bean Classes
+
+| Class | Wire `op` | Extra members |
+|---|---|---|
+| `JsonPatchOperation` | — (abstract) | `path` (JSON Pointer) |
+| `AddOp` | `"add"` | `value` |
+| `RemoveOp` | `"remove"` | — |
+| `ReplaceOp` | `"replace"` | `value` |
+| `MoveOp` | `"move"` | `from` (JSON Pointer) |
+| `CopyOp` | `"copy"` | `from` (JSON Pointer) |
+| `TestOp` | `"test"` | `value` |
+| `JsonPatch` | — | `LinkedList<JsonPatchOperation>` — the document itself |
+
+## Serializer / parser configuration
+
+The dictionary wiring tells the parser how to map `op` ⇒ subclass, but the
serializer still needs to know to emit the `op` discriminator. Configure both
ends like this:
+
+```java
+import org.apache.juneau.json.*;
+import org.apache.juneau.bean.jsonpatch.*;
+
+JsonSerializer ser = JsonSerializer.create()
+ .addBeanTypes()
+ .typePropertyName(JsonPatchOperation.class, "op")
+ .build();
+
+JsonParser par = JsonParser.create()
+ .typePropertyName(JsonPatchOperation.class, "op")
+ .build();
+```
+
+## Basic Usage
+
+### Building a patch document
+
+```java
+import org.apache.juneau.bean.jsonpatch.*;
+
+JsonPatch patch = new JsonPatch()
+ .append(new TestOp("/a/b/c", "foo"))
+ .append(new RemoveOp("/a/b/c"))
+ .append(new AddOp("/a/b/c", java.util.List.of("foo", "bar")))
+ .append(new ReplaceOp("/a/b/c", 42))
+ .append(new MoveOp("/a/b/d", "/a/b/c"))
+ .append(new CopyOp("/a/b/e", "/a/b/d"));
+
+String wire = ser.serialize(patch);
+JsonPatch back = par.parse(wire, JsonPatch.class);
+```
+
+The wire form is a top-level JSON array of operation objects, matching the
example in [RFC 6902
§3](https://datatracker.ietf.org/doc/html/rfc6902#section-3):
+
+```json
+[
+ {"op":"test","path":"/a/b/c","value":"foo"},
+ {"op":"remove","path":"/a/b/c"},
+ {"op":"add","path":"/a/b/c","value":["foo","bar"]},
+ {"op":"replace","path":"/a/b/c","value":42},
+ {"op":"move","from":"/a/b/c","path":"/a/b/d"},
+ {"op":"copy","from":"/a/b/d","path":"/a/b/e"}
+]
+```
+
+### Polymorphic dispatch
+
+The parser materialises the concrete subclass keyed off the wire `op` value.
Each entry in the parsed `JsonPatch` is an instance of the matching subclass —
no manual instanceof / switch needed:
+
+```java
+JsonPatch back = par.parse(wire, JsonPatch.class);
+for (JsonPatchOperation op : back) {
+ if (op instanceof AddOp add) { /* ... */ }
+ else if (op instanceof RemoveOp rem) { /* ... */ }
+ else if (op instanceof ReplaceOp rp) { /* ... */ }
+ // ...
+}
+```
+
+### Extending with a custom operation
+
+`JsonPatchOperation` is `abstract`, not `sealed`, so callers can add their own
ops on top of the standard six. Subclass `JsonPatchOperation`, annotate with
`@Marshalled(typeName="your-op-name")`, and register the subclass in a custom
dictionary on your serializer / parser builder.
+
+## Content-Type
+
+The matching `Content-Type` constant lives in `juneau-rest-common` and has
been available since 9.2.x:
+
+```java
+import org.apache.juneau.http.header.ContentType;
+
+ContentType.APPLICATION_JSON_PATCH; // "application/json-patch+json"
+```
+
+## Resources
+
+- [RFC 6902 — JavaScript Object Notation (JSON)
Patch](https://datatracker.ietf.org/doc/html/rfc6902)
+- [RFC 6901 — JavaScript Object Notation (JSON)
Pointer](https://datatracker.ietf.org/doc/html/rfc6901)
+- [IANA `application/json-patch+json`
registration](https://www.iana.org/assignments/media-types/application/json-patch+json)
diff --git a/pages/topics/23.01.V9.5-migration-guide.md
b/pages/topics/23.01.V9.5-migration-guide.md
index 1b2966d40c..5f5c305c27 100644
--- a/pages/topics/23.01.V9.5-migration-guide.md
+++ b/pages/topics/23.01.V9.5-migration-guide.md
@@ -59,10 +59,10 @@ flavored maps / lists based on the parser's language, which
changes the runtime
|-----|-----|-------|
| `JsonMap#toString()` returned JSON5 (via `Json5.of(this)`). | Returns strict
RFC 8259 JSON (via `Json.of(this)`). | Callers that want JSON5 output should
switch to `Json5Map` (or call `Json5.of(map)` explicitly). On `JsonMap` itself,
`toJson5()` still returns JSON5 — only `toString()` changed. |
| `JsonList#toString()` returned JSON5. | Returns strict JSON. | Same advice —
switch to `Json5List`, or call `Json5.of(list)` / `list.toJson5()`. |
-| `new JsonMap(CharSequence)` / `new JsonMap(Reader)` /
`JsonMap.ofJson(CharSequence)` defaulted to `Json5Parser.DEFAULT`. | Default to
`JsonParser.DEFAULT`. The single-arg `ofJson(...)` factory was also renamed to
`ofText(...)`. | Callers feeding JSON5-with-unquoted-keys text into the bare
constructor will now throw `ParseException`. Either: (1) switch to `new
Json5Map(CharSequence)` / `Json5Map.ofText(...)`, or (2) pass an explicit
`Json5Parser.DEFAULT` to `MarshalledMap.ofText(text, J [...]
-| `new JsonList(CharSequence)` / `new JsonList(Reader)` /
`JsonList.ofJson(CharSequence)` defaulted to `Json5Parser.DEFAULT`. | Default
to `JsonParser.DEFAULT`. The single-arg `ofJson(...)` factory was also renamed
to `ofText(...)`. | Same change, same advice — switch to `Json5List` /
`Json5List.ofText(...)`, or pass an explicit `Json5Parser.DEFAULT` to
`MarshalledList.ofText(...)`. Call sites of `JsonList.ofJson(...)` should be
renamed to `JsonList.ofText(...)`. |
-| `Json5Map.ofJson5(CharSequence)` / `Json5Map.ofJson5(Reader)` |
`Json5Map.ofText(CharSequence)` / `Json5Map.ofText(Reader)` | Method renamed
for consistency with `MarshalledMap.ofText(...)`. No behavioral change — the
single-arg form still uses `Json5Parser.DEFAULT`. |
-| `Json5List.ofJson5(CharSequence)` / `Json5List.ofJson5(Reader)` |
`Json5List.ofText(CharSequence)` / `Json5List.ofText(Reader)` | Method renamed
for consistency with `MarshalledList.ofText(...)`. No behavioral change — the
single-arg form still uses `Json5Parser.DEFAULT`. (Note:
`Json5List.ofJson5OrCdl(String)` was NOT renamed.) |
+| `new JsonMap(CharSequence)` / `new JsonMap(Reader)` /
`JsonMap.ofJson(CharSequence)` defaulted to `Json5Parser.DEFAULT`. | Default to
`JsonParser.DEFAULT`. The single-arg parse factory is now `ofString(...)`
(`ofText(...)` remains as a deprecated alias). | Callers feeding
JSON5-with-unquoted-keys text into the bare constructor will now throw
`ParseException`. Either: (1) switch to `new Json5Map(CharSequence)` /
`Json5Map.ofString(...)`, or (2) pass an explicit `Json5Parser.DEFAULT` to
[...]
+| `new JsonList(CharSequence)` / `new JsonList(Reader)` /
`JsonList.ofJson(CharSequence)` defaulted to `Json5Parser.DEFAULT`. | Default
to `JsonParser.DEFAULT`. The single-arg parse factory is now `ofString(...)`
(`ofText(...)` remains as a deprecated alias). | Same change, same advice —
switch to `Json5List` / `Json5List.ofString(...)`, or pass an explicit
`Json5Parser.DEFAULT` to `MarshalledList.ofString(...)`. Call sites of
`JsonList.ofJson(...)` should be renamed to `JsonList.ofStrin [...]
+| `Json5Map.ofJson5(CharSequence)` / `Json5Map.ofJson5(Reader)` |
`Json5Map.ofString(CharSequence)` / `Json5Map.ofString(Reader)` (`ofText(...)`
deprecated alias) | Method naming now aligns with string-based parse factories
across `MarshalledMap`/`JsonMap`/`Json5Map`. No behavioral change — the
single-arg form still uses `Json5Parser.DEFAULT`. |
+| `Json5List.ofJson5(CharSequence)` / `Json5List.ofJson5(Reader)` |
`Json5List.ofString(CharSequence)` / `Json5List.ofString(Reader)`
(`ofText(...)` deprecated alias) | Method naming now aligns with string-based
parse factories across `MarshalledList`/`JsonList`/`Json5List`. No behavioral
change — the single-arg form still uses `Json5Parser.DEFAULT`. (Note:
`Json5List.ofJson5OrCdl(String)` was NOT renamed.) |
| `Json5Parser.DEFAULT.parse(s, Object.class)` returned a `JsonMap` (and
nested objects were `JsonMap` / `JsonList`). | Returns a `Json5Map` (and nested
objects are `Json5Map` / `Json5List`). | Same change applies to `parse(s,
Map.class)` / `parse(s, Collection.class)` targets, and to nested maps / lists
inside the parsed tree. Code that casts the result to `JsonMap` will throw
`ClassCastException`. Fix options: (1) cast to `Json5Map` / `Json5List`
instead, (2) cast to the neutral `Marsh [...]
| Every parser other than `JsonParser` / `Json5Parser` (`XmlParser`,
`YamlParser`, `UonParser`, `UrlEncodingParser`, `HoconParser`, `MsgPackParser`,
`CborParser`, `BsonParser`, `HtmlParser`, `JsonlParser`, `HjsonParser`,
`MarkdownParser`, `CsvParser`, `RdfXmlParser`, etc.) returned `JsonMap` /
`JsonList` from `parse(s, Object.class)`. | Returns the neutral `MarshalledMap`
/ `MarshalledList`. | Same fix options as the `Json5Parser` row above.
Per-language flavored `XMap` / `XList` (e.g. ` [...]
| `org.apache.juneau.collections.ResolvingJsonMap` |
`org.apache.juneau.collections.ResolvingMarshalledMap` | Renamed AND
re-parented from `JsonMap` to the new neutral `MarshalledMap` base — SVL
resolution is language-agnostic. Hard rename, no deprecation shim. Update the
import and any `new ResolvingJsonMap(...)` constructor calls. |
diff --git a/sidebars.ts b/sidebars.ts
index 243bb19406..a871cd04b5 100644
--- a/sidebars.ts
+++ b/sidebars.ts
@@ -709,6 +709,18 @@ const sidebars: SidebarsConfig = {
},
],
},
+ {
+ type: 'category',
+ label: '2.43. SSE
Support',
+ collapsed: true,
+ items: [
+ {
+ type:
'doc',
+ id:
'topics/02.43.01.SseBasics',
+ label:
'2.43.1. SSE Basics',
+ },
+ ],
+ },
{
type: 'doc',
id:
'topics/02.34.BestPractices',
@@ -788,6 +800,26 @@ const sidebars: SidebarsConfig = {
id:
'topics/04.08.JuneauBeanMcp',
label: '4.8.
juneau-bean-mcp',
},
+ {
+ type: 'doc',
+ id:
'topics/04.09.JuneauBeanRfc7807',
+ label: '4.9.
juneau-bean-rfc7807',
+ },
+ {
+ type: 'doc',
+ id:
'topics/04.10.JuneauBeanHal',
+ label: '4.10.
juneau-bean-hal',
+ },
+ {
+ type: 'doc',
+ id:
'topics/04.11.JuneauBeanJsonApi',
+ label: '4.11.
juneau-bean-jsonapi',
+ },
+ {
+ type: 'doc',
+ id:
'topics/04.12.JuneauBeanJsonPatch',
+ label: '4.12.
juneau-bean-jsonpatch',
+ },
],
},
{
diff --git a/static/ai/juneau-knowledge.jsonl b/static/ai/juneau-knowledge.jsonl
index b7d4d3b3bc..c562673d74 100644
--- a/static/ai/juneau-knowledge.jsonl
+++ b/static/ai/juneau-knowledge.jsonl
@@ -97,12 +97,12 @@
{"description": "# Release 9.0.1\n\n**Date:** Sept 6, 2023\n\nJuneau 9.0.1 is
a minor maintenance release containing dependency updates.\n\n## Dependency
Updates\n\n- Updated all dependent project versions to their latest minor
releases\n- Security patches and bug fixes from upstream dependencies\n-
Improved compatibility with latest build tools and environments\n\n##
Notes\n\nThis release contains no functional changes to Juneau APIs or
features.\nAll changes are limited to dependency v [...]
{"description": "# Release 9.1.0\n\n**Date:** June 19, 2025\n\nJuneau 9.1.0 is
a major compatibility update focused on Jakarta EE migration and Spring Boot
modernization.\n\n## Major Changes\n\n### Jakarta EE Migration\n\n- **Complete
javax to jakarta namespace migration**: All references to `javax.*` packages
have been converted to their corresponding `jakarta.*` equivalents.\n This
includes:\n - `javax.servlet.*` \u2192 `jakarta.servlet.*`\n -
`javax.validation.*` \u2192 `jakarta.va [...]
{"description": "# Release 9.2.0\n\n**Date:** 01/05/2026\n\nJuneau 9.2.0 is a
minor release focused on enhancements and bug fixes.\n\nMajor changes
include:\n\n- **Hjson (Human JSON) Support**: New native serializer and parser
for Hjson format with quoteless strings, multiline strings, comments, and
optional commas \u2014 ideal for configuration files and hand-edited data\n-
**New Module**: Introduced `juneau-shaded` with five shaded (uber) JAR
artifacts for simplified dependency managem [...]
-{"description": "# Release 9.5.0\n\n**Date:** TBD\n\nJuneau 9.5.0 is a minor
release with native TOML and YAML support, BSON (Binary JSON) support for
MongoDB-interoperable binary serialization, CBOR (Concise Binary Object
Representation) per RFC 8949 for IoT and constrained environments, full CSV
serializer/parser support, JCS (JSON Canonicalization Scheme) per RFC 8785 for
deterministic hashing and signing, RDF/THRIFT and RDF/PROTO binary format
support, native serialization support fo [...]
+{"description": "# Release 9.5.0\n\n**Date:** TBD\n\nJuneau 9.5.0 is a minor
release with native TOML and YAML support, BSON (Binary JSON) support for
MongoDB-interoperable binary serialization, CBOR (Concise Binary Object
Representation) per RFC 8949 for IoT and constrained environments, full CSV
serializer/parser support, JCS (JSON Canonicalization Scheme) per RFC 8785 for
deterministic hashing and signing, RDF/THRIFT and RDF/PROTO binary format
support, native serialization support fo [...]
{"description": "#### About\n\nApache Juneau\u2122 is a single cohesive Java
ecosystem for marshalling Java objects to a wide variety of language types and
\ncreating annotation-based REST end-to-end server and client APIs.\n\n####
Ecosystem\n\nThe Juneau ecosystem consists of the following parts:\n\n|
Category | Maven Artifacts | Description | Prerequisites
|\n|----------|------------------|-------------|---------------|\n|
**juneau-core** | [juneau\u2011assertions](/docs/topics/JuneauA [...]
{"description": "The [juneau-marshall](/docs/topics/JuneauMarshallBasics)
library includes easy-to-use and highly customizable serializers and parsers
based around a common\nAPI.\nIt allows you to marshall Java POJOs directly to
and from a wide variety of language types without the need for\nintermediate
Document Object Models making them extremely efficient.\n\nSupported languages
include: \n\n- JSON\n- XML\n- HTML\n- UON\n- URL-Encoding\n- MessagePack\n-
OpenAPI\n- SOAP/XML\n- CSV\n- Y [...]
{"description": "The [juneau-rest-server](/docs/topics/JuneauRestServerBasics)
and [juneau-rest-client](/docs/topics/JuneauRestClientBasics) libraries provide
server and client side REST capabilities that can be\nused by themselves, or
together to create simplified yet sophisticated Java-based REST communications
layers that\ncompletely hide away the complexities of the REST protocol.\n\nA
typical pattern is to define a REST API on the server
side:\n\n```java\n@Rest(path=\"/petstore\")\n [...]
{"description": "#### `@Rest`-Annotated Resources\n\nA REST resource is simply
a Java class annotated with <a
href=\"/site/apidocs/org/apache/juneau/rest/annotation/Rest.html\"
target=\"_blank\">Rest</a>.\nThe most common case is a class that extends <a
href=\"/site/apidocs/org/apache/juneau/rest/servlet/BasicRestServlet.html\"
target=\"_blank\">BasicRestServlet</a>, which itself is simply an extension of
<a
href=\"https://jakarta.ee/specifications/servlet/6.0/apidocs/jakarta/servlet/htt
[...]
-{"description": "Built upon the feature-rich Apache HttpClient library, the
Juneau RestClient API adds support for fluent-style REST\ncalls and the ability
to perform marshalling of POJOs to and from HTTP parts.\n\n:::tip
Example\n```java\n// Create a basic REST client with JSON support and download
a bean.\nMyBean bean = RestClient.create()\n .json5()\n .build()\n
.get(URI)\n .run()\n .assertStatus().asCode().is(200)\n
.assertHeader(\"Content-Type\").matchesSimple(\"ap [...]
+{"description": "Juneau ships two REST client stacks:\n\n- The classic
`org.apache.juneau.rest.client.classic.RestClient` (HC4.5-based, supports the
rich fluent surface shown below) in the `juneau-rest-client-classic` Maven
module.\n- The next-generation `org.apache.juneau.rest.client.RestClient`
(transport-agnostic, no Apache HttpClient dependency) in the
`juneau-rest-client` Maven module \u2014 see [Next-Generation REST
Client](/docs/topics/NextGenRestClient).\n\nThe remainder of this [...]
{"description": "The [juneau-bean](/docs/topics/JuneauBeanBasics) libraries
contain several predefined POJOs for generating commonly-used document types
that are designed\nto be used with the Juneau Marshaller APIs for both
serializing and parsing.\n\n#### HTML5\n\nThe Juneau HTML5 DTO beans are simply
beans with fluent-style setters that allow you to quickly construct HTML
fragments as\nJava objects.\nThese objects can then be serialized to HTML using
one of the existing HTML serializer [...]
{"description": "The [juneau-config](/docs/topics/JuneauConfigBasics) library
contains a powerful API for creating and using INI-style config
files.\n\n:::tip Example configuration file\n```ini\n# A set of
entries\n[Section1]\n\n# An integer\nkey1 = 1\n\n# A boolean\nkey2 = true\n\n#
An array\nkey3 = 1,2,3\n\n# A POJO\nkey4 = http://bar\n```\n:::\n\nConfig files
are accessed through the <a
href=\"/site/apidocs/org/apache/juneau/config/Config.html\"
target=\"_blank\">Config</a> class whic [...]
{"description": "The juneau-assertions module in Juneau is a powerful API for
performing fluent style assertions.\n\nFluent assertions have two types of
methods:\n\n- `asX` methods which perform transformations.\n- `isX` methods
which perform assertions.\n\nMultiple transformations and assertions can be
performed per statement.\n\n:::tip Examples\n```java\nimport static
org.apache.juneau.assertions.Assertions.*;\nimport static
org.apache.juneau.assertions.AssertionPredicates.*;\n\n// Che [...]
@@ -126,7 +126,7 @@
{"description": "There is a separate set of serializers and parsers for
marshalling HTTP parts (query, form-data, headers, path\nvariables, and
plain-text request bodies).\nThe distinction is that these are designed to
marshall directly to-and-from strings based on OpenAPI
schema\ninformation.\n\n```java\n// Schema information about our
part.\nHttpPartSchema schema = HttpPartSchema\n .tArrayPipes()\n
.items(\n HttpPartSchema\n .tArrayCsv()\n
.items(\n [...]
{"description": "Serializers and parsers have a wide variety of configurable
settings.\nTheir builders all extend from the <a
href=\"/site/apidocs/org/apache/juneau/MarshallingContext.Builder.html\"
target=\"_blank\">MarshallingContext.Builder</a> class\nthat allows you to
easily construct new instances from scratch or build upon existing
instances.\n\nFor example, the following code shows how to configure a JSON
serializer:\n\n```java\nWriterSerializer serializer = JsonSerializer\n .
[...]
{"description": "All configurable properties described in the previous section
have annotation equivalents that can be applied on classes\nor methods.\n\nIn
the section on the REST server API, we describe how to configure serializers
and parsers using `@XConfig` annotations\nlike those shown
below:\n\n```java\n@Rest(\n path=\"/addressBook\",\n title=\"Address Book
REST API\"\n
...\n)\n@SerializerConfig(quoteChar=\"'\")\n@RdfConfig(rdfxml_tab=\"5\",
addRootProperty=\"true\")\n@Ma [...]
-{"description": "The <a
href=\"/site/apidocs/org/apache/juneau/collections/JsonMap.html\"
target=\"_blank\">JsonMap</a> and <a
href=\"/site/apidocs/org/apache/juneau/collections/JsonList.html\"
target=\"_blank\">JsonList</a> classes are generic Java representations of JSON
objects and arrays.\nThese classes can be used to create \"unstructured\"
models for serialization (as opposed to \"structured\" models\nconsisting of
beans).\n\nIf you want to quickly generate JSON/XML/HTML from gener [...]
+{"description": "The <a
href=\"/site/apidocs/org/apache/juneau/collections/JsonMap.html\"
target=\"_blank\">JsonMap</a> and <a
href=\"/site/apidocs/org/apache/juneau/collections/JsonList.html\"
target=\"_blank\">JsonList</a> classes are generic Java representations of JSON
objects and arrays.\nThese classes can be used to create \"unstructured\"
models for serialization (as opposed to \"structured\" models\nconsisting of
beans).\n\nIf you want to quickly generate JSON/XML/HTML from gener [...]
{"description": "The Juneau parsers have the ability to parse into complex
data types that consist of multidimensional arrays and nested\n`Maps` and
`Collections` using the methods below:\n\n<tree>\n<node-0><java-class><a
href=\"/site/apidocs/org/apache/juneau/parser/Parser.html\"
target=\"_blank\">Parser</a></java-class></node-0>\n<node-1><java-method><a
href=\"/site/apidocs/org/apache/juneau/parser/Parser.html#<init>(org.apache.juneau.parser.Parser.Builder)\"
target=\"_blank\">parse(Ob [...]
{"description": "On top of the serializers and parsers are the <a
href=\"/site/apidocs/org/apache/juneau/serializer/SerializerSet.html\"
target=\"_blank\">SerializerSet</a> and <a
href=\"/site/apidocs/org/apache/juneau/parser/ParserSet.html\"
target=\"_blank\">ParserSet</a> classes.\nThese classes allow serializers and
parsers to be grouped and retrieved by W3C-compliant HTTP `Accept`
and\n`Content-Type` values...\n\n```java\n// Construct a new serializer group
with configuration paramet [...]
{"description": "<a
href=\"/site/apidocs/org/apache/juneau/swap/ObjectSwap.html\"
target=\"_blank\">Swaps</a> are a critical component of Juneau.\nThey allow the
serializers and parsers to handle Java objects that wouldn't normally be
serializable.\n\nSwaps are, simply put, 'object swappers' that swap in
serializable objects for non-serializable ones during serialization, and
vis-versa during parsing.\n\nSome examples of non-serializable objects are
`File`, `Reader`, `Iterable`, etc...\n [...]
@@ -142,7 +142,7 @@
{"description": "In addition to the bean type name support described above,
simplified support is provided for bean subtypes.\n\nBean subtypes are similar
in concept to bean type names, except for the following differences:\n\n- You
specify the list of possible subclasses through an annotation on a parent bean
class.\n- You do not need to register the subtype classes on the bean
dictionary of the parser.\n\nIn the following example, the abstract class has
two subclasses:\n\n```java\n// A [...]
{"description": "The <a
href=\"/site/apidocs/org/apache/juneau/MarshallingContext.Builder.html#disableInterfaceProxies()\"
target=\"_blank\">MarshallingContext.Builder.disableInterfaceProxies()</a>
setting (enabled by default) allows the Juneau parsers to parse content into
virtual beans (bean interfaces without implementation classes).\n\nFor example,
the following code creates an instance of the specified unimplemented
interface:\n\n```java\n// Our unimplemented interface\npublic inter [...]
{"description": "The Juneau Serializer API is designed to be used against POJO
tree structures.\nIt expects that there not be loops in the POJO model
(e.g.\nchildren with references to parents, etc...).\nIf you try to serialize
models with loops, you will usually cause a `StackOverflowError` to be thrown
(if <a
href=\"/site/apidocs/org/apache/juneau/MarshallingTraverseContext.Builder.html#maxDepth(int)\"
target=\"_blank\">MarshallingTraverseContext.Builder.maxDepth(int)</a> is not
reache [...]
-{"description": "The Juneau parsers are not limited to parsing back into the
original bean classes.\nIf the bean classes are not available on the parsing
side, the parser can also be used to parse into a generic model\nconsisting of
`Maps`, `Collections`, and primitive objects.\n\nYou can parse into any `Map`
type (e.g. `HashMap`, `TreeMap`) but using <a
href=\"/site/apidocs/org/apache/juneau/collections/JsonMap.html\"
target=\"_blank\">JsonMap</a> is recommended since it has many conven [...]
+{"description": "The Juneau parsers are not limited to parsing back into the
original bean classes.\nIf the bean classes are not available on the parsing
side, the parser can also be used to parse into a generic model\nconsisting of
`Maps`, `Collections`, and primitive objects.\n\nYou can parse into any `Map`
type (e.g. `HashMap`, `TreeMap`) but using <a
href=\"/site/apidocs/org/apache/juneau/collections/JsonMap.html\"
target=\"_blank\">JsonMap</a> is recommended since it has many conven [...]
{"description": "The following parsers can be configured to read continuous
streams of objects from the same input
stream:\n\n<tree>\n<node-0><javac-class><a
href=\"/site/apidocs/org/apache/juneau/json/JsonParser.html\"
target=\"_blank\">JsonParser</a></javac-class> <javac-class><a
href=\"/site/apidocs/org/apache/juneau/uon/UonParser.html\"
target=\"_blank\">UonParser</a></javac-class> <javac-class><a
href=\"/site/apidocs/org/apache/juneau/msgpack/MsgPackParser.html\"
target=\"_blank\">M [...]
{"description": "Juneau supports streaming serialization and parsing of
arbitrarily large datasets without loading\nall elements into memory. The
feature is built directly into the serializer and parser APIs, so\nevery format
(JSON, XML, YAML, CSV, MessagePack, \u2026) works transparently.\n\n## Key
Interfaces\n\n| Interface | Extends | Direction | Purpose
|\n|---|---|---|---|\n| `BeanSupplier<T>` | `Iterable<T>` | Serialization |
Provides beans to serializers lazily from a cursor or que [...]
{"description": "Juneau serializers have sophisticated support for
transforming relative URIs to absolute form.\n\nThe following example shows a
bean containing URIs of various forms and how they end up
serialized.\n\n```java\n// Our bean with properties containing various kinds of
URIs.\npublic class TestURIs {\n public URI\n a =
URI.create(\"http://www.apache.org/a\"),\n b = URI.create(\"/b\"),\n
c = URI.create(\"/c/x/y\"),\n d = URI.create(\"d\"),\n [...]
@@ -161,7 +161,7 @@
{"description": "The <a
href=\"/site/apidocs/org/apache/juneau/json/Json5Serializer.html\"
target=\"_blank\">Json5Serializer</a> class can be used to serialized
POJOs\ninto JSON 5 notation.\n\nJSON 5 is similar to JSON except for the
following:\n\n- JSON attributes are only quoted when necessary.\n- Uses
single-quotes for quoting.\n\n:::tip Examples\n```java\n// Some free-form
JSON.\nJsonMap map = JsonMap.of(\n \"foo\", \"x1\",\n \"_bar\", \"x2\",\n
\" baz \", \"x3\",\n \"123 [...]
{"description": "The <a
href=\"/site/apidocs/org/apache/juneau/json/JsonParser.html\"
target=\"_blank\">JsonParser</a> class is used to parse JSON into POJOs.\n\nThe
class hierarchy for the builder of this parser
is:\n\n<tree>\n<node-0><java-abstract-class><a
href=\"/site/apidocs/org/apache/juneau/Context.Builder.html\"
target=\"_blank\">Context.Builder</a></java-abstract-class></node-0>\n<node-1><java-abstract-class><a
href=\"/site/apidocs/org/apache/juneau/MarshallingContextable.Builde [...]
{"description": "The <a
href=\"/site/apidocs/org/apache/juneau/json/annotation/Json.html\"
target=\"_blank\">@Json</a> annotation is used to override the behavior of <a
href=\"/site/apidocs/org/apache/juneau/json/JsonSerializer.html\"
target=\"_blank\">JsonSerializer</a> on individual bean classes or
properties.\n\nThe annotation can be applied to beans as well as other objects
serialized to other types (e.g.
strings).\n\n<tree>\n<node-0><java-annotation><a href=\"/site/apidocs/org/apach
[...]
-{"description": "Juneau provides the <a
href=\"/site/apidocs/org/apache/juneau/json/JsonSchemaSerializer.html\"
target=\"_blank\">JsonSchemaSerializer</a> class for\ngenerating JSON-Schema
documents that describe the output generated by the <a
href=\"/site/apidocs/org/apache/juneau/json/JsonSerializer.html\"
target=\"_blank\">JsonSerializer</a> class.\nThis class shares the same
properties as `JsonSerializer`.\n\nFor convenience the <a
href=\"/site/apidocs/org/apache/juneau/json/JsonSeri [...]
+{"description": "Juneau provides the <a
href=\"/site/apidocs/org/apache/juneau/json/JsonSchemaSerializer.html\"
target=\"_blank\">JsonSchemaSerializer</a> class for\ngenerating JSON-Schema
documents that describe the output generated by the <a
href=\"/site/apidocs/org/apache/juneau/json/JsonSerializer.html\"
target=\"_blank\">JsonSerializer</a> class.\nThis class shares the same
properties as `JsonSerializer`.\n\nFor convenience the <a
href=\"/site/apidocs/org/apache/juneau/json/JsonSeri [...]
{"description": "Juneau supports converting arbitrary POJOs to and from XML
using ultra-efficient serializers and parsers.\n\nThe XML serializer converts
POJOs directly to XML without the need for intermediate DOM objects.\nLikewise,
the XML parser uses a STaX parser and creates POJOs directly without
intermediate DOM objects.\n\nUnlike frameworks such as JAXB, Juneau does not
require POJO classes to be annotated to produce and consume XML.\nHowever,
several XML annotations are provided [...]
{"description": "The following examples show how different data types are
represented in XML.\nThey mirror how the data structures are represented in
JSON.\n\n##### Simple types\n\nThe representation of loose (not a direct bean
property value) simple types are shown below:\n\n<table
class=\"code-table\">\n<tr>\n<th>Data type</th>\n<th>JSON
example</th>\n<th>XML</th>\n</tr>\n<tr>\n<td>string</td>\n<td>\n```json\n'foo'\n```\n</td>\n<td>\n```xml\n<string>foo</string>\n```\n</td>\n</tr>\n<tr
[...]
{"description": "The <a
href=\"/site/apidocs/org/apache/juneau/xml/XmlSerializer.html\"
target=\"_blank\">XmlSerializer</a> class is used to serialize POJOs into
XML.\n\nThe <a
href=\"/site/apidocs/org/apache/juneau/xml/XmlDocSerializer.html\"
target=\"_blank\">XmlDocSerializer</a> class is the same but serializes
a\n`<?xml?>` header at the top of the file.\n\nThe class hierarchy for the
builder of this serializer is:\n\n<tree>\n<node-0><java-abstract-class><a
href=\"/site/apidocs/org/ap [...]
@@ -189,7 +189,7 @@
{"description": "The <a
href=\"/site/apidocs/org/apache/juneau/urlencoding/UrlEncodingSerializer.html\"
target=\"_blank\">UrlEncodingSerializer</a> class is used to\nserialize POJOs
into URL-Encoding.\nThe class hierarchy for the builder of this serializer
is:\n\n<tree>\n<node-0><java-abstract-class><a
href=\"/site/apidocs/org/apache/juneau/Context.Builder.html\"
target=\"_blank\">Context.Builder</a></java-abstract-class></node-0>\n<node-1><java-abstract-class><a
href=\"/site/apidocs/org [...]
{"description": "The <a
href=\"/site/apidocs/org/apache/juneau/urlencoding/UrlEncodingParser.html\"
target=\"_blank\">UrlEncodingParser</a> class is used to parse\nURL-Encoding
into POJOs.\nThe class hierarchy for the builder of this parser
is:\n\n<tree>\n<node-0><java-abstract-class><a
href=\"/site/apidocs/org/apache/juneau/Context.Builder.html\"
target=\"_blank\">Context.Builder</a></java-abstract-class></node-0>\n<node-1><java-abstract-class><a
href=\"/site/apidocs/org/apache/juneau/M [...]
{"description": "The <a
href=\"/site/apidocs/org/apache/juneau/urlencoding/annotation/UrlEncoding.html\"
target=\"_blank\">@UrlEncoding</a> annotation is used to\noverride the
behavior of <a
href=\"/site/apidocs/org/apache/juneau/urlencoding/UrlEncodingSerializer.html\"
target=\"_blank\">UrlEncodingSerializer</a>\non individual bean classes or
properties.\n\n<tree>\n<node-0><java-annotation><a
href=\"/site/apidocs/org/apache/juneau/urlencoding/annotation/UrlEncoding.html\"
target=\"_blan [...]
-{"description": "Juneau supports converting arbitrary POJOs to and from
MessagePack using ultra-efficient serializers and parsers.\nMessagePack is a
compact binary form of JSON.\n\nThe serialization support for MessagePack
mirrors that of JSON.", "id": "topic:29d5171dfaba", "module": "31",
"related_ids": [], "source_path": "pages/topics/02.31.01.MessagePackBasics.md",
"source_type": "topic", "summary": "Juneau supports converting arbitrary POJOs
to and from MessagePack using ultra-effici [...]
+{"description": "Juneau supports converting arbitrary POJOs to and from
MessagePack using ultra-efficient serializers and parsers.\nMessagePack is a
compact binary form of JSON.\n\nThe serialization support for MessagePack
mirrors that of JSON.\n\n## Media types\n\nThe serializer emits `Content-Type:
application/msgpack` (the RFC 6838-conforming value, matching the
constant\n`org.apache.juneau.http.header.ContentType.APPLICATION_MSGPACK`).\nThe
parser accepts both `application/msgpack` a [...]
{"description": "The <a
href=\"/site/apidocs/org/apache/juneau/msgpack/MsgPackSerializer.html\"
target=\"_blank\">MsgPackSerializer</a> class is used to serialize POJOs\ninto
MessagePack.\n\nThe class hierarchy for the builder of this serializer
is:\n\n<tree>\n<node-0><java-abstract-class><a
href=\"/site/apidocs/org/apache/juneau/Context.Builder.html\"
target=\"_blank\">Context.Builder</a></java-abstract-class></node-0>\n<node-1><java-abstract-class><a
href=\"/site/apidocs/org/apache/jun [...]
{"description": "The <a
href=\"/site/apidocs/org/apache/juneau/msgpack/MsgPackParser.html\"
target=\"_blank\">MsgPackParser</a> class is used to parse MessagePack
into\nPOJOs.\n\nThe class hierarchy for the builder of this parser
is:\n\n<tree>\n<node-0><java-abstract-class><a
href=\"/site/apidocs/org/apache/juneau/Context.Builder.html\"
target=\"_blank\">Context.Builder</a></java-abstract-class></node-0>\n<node-1><java-abstract-class><a
href=\"/site/apidocs/org/apache/juneau/MarshallingC [...]
{"description": "Juneau supports converting arbitrary POJOs to and from
strings using OpenAPI-based schema rules.\n\nThe relevant classes for using
OpenAPI-based serialization are:\n\n<tree>\n<node-0><java-class><a
href=\"/site/apidocs/org/apache/juneau/oapi/OpenApiSerializer.html\"
target=\"_blank\">OpenApiSerializer</a></java-class> - Converts POJOs to
strings.</node-0>\n<node-0><java-class><a
href=\"/site/apidocs/org/apache/juneau/oapi/OpenApiParser.html\"
target=\"_blank\">OpenApiPar [...]
@@ -214,6 +214,7 @@
{"description": "Juneau supports converting arbitrary POJOs to and from BSON
(Binary JSON) using native serializers and parsers. BSON is the binary
serialization format used by MongoDB, extending JSON with typed integers
(int32/int64), native datetime, decimal128, and binary data. It uses
little-endian byte order and length-prefixed documents.\n\nThe <a
href=\"/site/apidocs/org/apache/juneau/bson/BsonSerializer.html\"
target=\"_blank\">BsonSerializer</a> converts POJOs directly to BSON f [...]
{"description": "Juneau supports converting arbitrary POJOs to and from CBOR
(Concise Binary Object Representation) per RFC 8949 using native serializers
and parsers. CBOR is a compact binary format designed for extremely small code
size, very small message size, and extensibility. It is widely used in IoT,
constrained environments, COSE (CBOR Object Signing and Encryption), and
WebAuthn.\n\nThe <a
href=\"/site/apidocs/org/apache/juneau/cbor/CborSerializer.html\"
target=\"_blank\">CborSe [...]
{"description": "Juneau supports converting arbitrary POJOs to and from HOCON
(Human-Optimized Config Object Notation) using native serializers and parsers.
HOCON is a superset of JSON used extensively in the JVM ecosystem (Akka, Play
Framework, sbt, Apache Spark, Kafka, Flink) for configuration files. It extends
JSON with path expressions, `=` as key-value separator, unquoted strings,
object merging, substitutions (`${var}`), triple-quoted multi-line strings, and
optional root braces.\n [...]
+{"description": "Juneau supports the [Server-Sent Events
(SSE)](https://html.spec.whatwg.org/multipage/server-sent-events.html)\nwire
format (`text/event-stream`) via native serializer and parser implementations
under\n`org.apache.juneau.sse`. SSE is the one-way push channel used by
browsers (`EventSource`) and\nmost LLM streaming APIs (OpenAI, Anthropic, etc.)
for progress events, partial responses,\nheartbeats, and other long-lived
telemetry feeds.\n\nThe <a href=\"/site/apidocs/org/ap [...]
{"description": "The <a
href=\"/site/apidocs/org/apache/juneau/marshaller/package-summary.html\"
target=\"_blank\">org.apache.juneau.marshaller</a> and\n<a
href=\"/site/apidocs/org/apache/juneau/jena/package-summary.html\"
target=\"_blank\">org.apache.juneau.jena</a> packages provide\nRDF (Resource
Description Framework) serializers and parsers for converting POJOs to and from
RDF formats.\nThese rely on the Apache Jena library and support both text-based
and binary RDF representations.\ [...]
{"description": "The RDF serializers convert POJOs into RDF representations.
The module provides both character-based serializers (text formats) and
stream-based serializers (RDF/THRIFT and RDF/PROTO binary formats).\n\n#####
Text-Based Serializers\n\n| Class | Format | Output |\n|---|---|---|\n| <a
href=\"/site/apidocs/org/apache/juneau/jena/RdfXmlSerializer.html\"
target=\"_blank\">RdfXmlSerializer</a> | RDF/XML | String |\n| <a
href=\"/site/apidocs/org/apache/juneau/jena/RdfXmlAbbrevS [...]
{"description": "The RDF parsers convert RDF input (text or binary) into
POJOs. The module provides character-based parsers for all text RDF formats and
stream-based parsers for RDF/THRIFT and RDF/PROTO binary formats.\n\n#####
Text-Based Parsers\n\n| Class | Format | Input |\n|---|---|---|\n| <a
href=\"/site/apidocs/org/apache/juneau/jena/RdfXmlParser.html\"
target=\"_blank\">RdfXmlParser</a> | RDF/XML | String, Reader |\n| <a
href=\"/site/apidocs/org/apache/juneau/jena/RdfJsonParser.ht [...]
@@ -221,11 +222,15 @@
{"description": "#### Maven Dependency\n\n```xml\n<dependency>\n
<groupId>org.apache.juneau</groupId>\n
<artifactId>juneau-bean</artifactId>\n
<version>${juneau.version}</version>\n</dependency>\n```\n\n#### Java
Library\n\n```text\njuneau-bean-0.0.0.jar\n```\n\n#### OSGi
Module\n\n```text\norg.apache.juneau.bean_0.0.0.jar\n```\n\n####
Contents/Features\n- Predefined POJOs for generating commonly-used document
types.", "id": "topic:94e763732154", "module": "01", "related_ids": [ [...]
{"description": "The Juneau HTML5 DTO beans are simply beans with fluent-style
setters that allow you to quickly construct HTML fragments as\nJava
objects.\nThese object can then be serialized to HTML using one of the existing
HTML serializers, or to other languages such as\nJSON using the JSON
serializers.\nThe <a
href=\"/site/apidocs/org/apache/juneau/bean/html5/HtmlBuilder.html\"
target=\"_blank\">HtmlBuilder</a> class is a utility class with
predefined\nstatic methods that allow you [...]
{"description": "The Juneau ATOM feed DTO beans are simply beans with
fluent-style setters.\n\nThe following code shows a feed being created
programmatically using the <a
href=\"/site/apidocs/org/apache/juneau/bean/atom/AtomBuilder.html\"
target=\"_blank\">AtomBuilder</a> class.\n\n```java\nimport static
org.apache.juneau.bean.atom.AtomBuilder.*;\n\nFeed feed =\n
feed(\"tag:juneau.apache.org\", \"Juneau ATOM specification\",
\"2016-01-02T03:04:05Z\")\n .setSubtitle(text(\"html\").s [...]
-{"description": "# juneau-bean-jsonschema\n\nThe `juneau-bean-jsonschema`
module provides Java beans for working with JSON Schema documents following the
**JSON Schema Draft 2020-12** specification.\n\n## Overview\n\nThis module
contains predefined POJOs for representing and manipulating JSON Schema
documents programmatically. These beans can be serialized to any format
supported by Juneau (JSON, XML, HTML, etc.), making it easy to generate and
consume JSON Schema documents in your appli [...]
+{"description": "# juneau-bean-jsonschema\n\nThe `juneau-bean-jsonschema`
module provides Java beans for working with JSON Schema documents following the
**JSON Schema Draft 2020-12** specification.\n\n## Overview\n\nThis module
contains predefined POJOs for representing and manipulating JSON Schema
documents programmatically. These beans can be serialized to any format
supported by Juneau (JSON, XML, HTML, etc.), making it easy to generate and
consume JSON Schema documents in your appli [...]
{"description": "# juneau-bean-openapi-v3\n\nThe `juneau-bean-openapi-v3`
module provides Java beans for working with OpenAPI 3.0 documents and user
interfaces.\n\n## Overview\n\nThis module contains predefined POJOs for:\n\n-
OpenAPI 3.0 document structure\n- API documentation generation\n- OpenAPI UI
rendering\n- Schema validation\n\n## OpenAPI Documents\n\nThe Juneau OpenAPI
DTO beans are simply beans with fluent-style setters that allow you to quickly
construct OpenAPI documents as J [...]
{"description": "# juneau-bean-common\n\nThe `juneau-bean-common` module
provides common utilities and base classes for the other `juneau-bean-X`
modules.\n\n## Overview\n\nThis module contains shared functionality used
across all bean modules, including:\n\n- Common base classes\n- Shared
utilities\n- Base interfaces\n- Common annotations\n\n## Usage\n\nThe
`juneau-bean-common` module is automatically included when you use any of the
other `juneau-bean-X` modules, so you typically don't [...]
{"description": "The `juneau-bean-swagger-v2` module provides Java beans for
working with Swagger 2.0 documents and user interfaces.\n\n*WORK-IN-PROGRESS*",
"id": "topic:8f51becbe70d", "module": "07", "related_ids": [], "source_path":
"pages/topics/04.07.JuneauBeanSwagger2.md", "source_type": "topic", "summary":
"The `juneau-bean-swagger-v2` module provides Java beans for working with
Swagger 2.0 documents and user interfaces.", "tags": ["topic", "07"], "title":
"juneau-bean-swagger-v2", [...]
{"description": "# juneau-bean-mcp\n\nThe `juneau-bean-mcp` module provides
Java beans modelling the [Model Context Protocol
(MCP)](https://modelcontextprotocol.io/) wire format.\n\n## Overview\n\nMCP is
a JSON-RPC 2.0 protocol used by AI assistants and agents to interact with
external tools, prompts, and resources. This module provides a complete set of
Juneau `@Marshalled`-annotated POJOs covering the MCP HTTP wire surface, so you
can build MCP servers and clients using any Juneau seri [...]
+{"description": "# juneau-bean-rfc7807\n\nThe `juneau-bean-rfc7807` module
provides Java beans for [RFC 7807 \u2014 Problem Details for HTTP
APIs](https://www.rfc-editor.org/rfc/rfc7807), the canonical machine-readable
error format used by `application/problem+json`.\n\n## Overview\n\nRFC 7807
standardises a five-field JSON document for carrying HTTP error details. Most
modern REST stacks ship a `ProblemDetail`-style bean out of the box (Spring's
`ProblemDetail`, ASP.NET's `ProblemDetail [...]
+{"description": "# juneau-bean-hal\n\nThe `juneau-bean-hal` module provides
Java beans for the [HAL (Hypertext Application
Language)](https://stateless.group/hal_specification.html) hypermedia format,
also described in
[draft-kelly-json-hal-08](https://datatracker.ietf.org/doc/html/draft-kelly-json-hal-08).
HAL is a JSON-based wire format that lets a REST API describe its resources
alongside the links and embedded sub-resources that surround them.\n\n##
Overview\n\nHAL standardises two r [...]
+{"description": "# juneau-bean-jsonapi\n\nThe `juneau-bean-jsonapi` module
provides Java beans for the [JSON:API v1.1](https://jsonapi.org/format/) wire
format, used by APIs that serve `application/vnd.api+json`. JSON:API
standardises a document shape, resource objects, relationships, errors, and
link semantics so clients and servers can interoperate without ad-hoc per-API
conventions.\n\n## Overview\n\nThis module models the JSON:API wire format as
typed `@Marshalled` POJOs that round-t [...]
+{"description": "# juneau-bean-jsonpatch\n\nThe `juneau-bean-jsonpatch` module
provides Java beans for [JSON Patch (RFC
6902)](https://datatracker.ietf.org/doc/html/rfc6902), the canonical patch
document format used by `application/json-patch+json`. A JSON Patch document is
a JSON array of operation objects describing changes (add, remove, replace,
move, copy, test) to apply to a target JSON document.\n\n## Overview\n\nThis
module models the JSON Patch wire format as typed `@Marshalled` [...]
{"description": "#### Maven Dependency\n\n```xml\n<dependency>\n
<groupId>org.apache.juneau</groupId>\n
<artifactId>juneau-config</artifactId>\n
<version>${juneau.version}</version>\n</dependency>\n```\n\n#### Java
Library\n\n```text\njuneau-config-0.0.0.jar\n```\n\n#### OSGi
Module\n\n```text\norg.apache.juneau.config_0.0.0.jar\n```\n\n####
Contents/Features\n\nThe `juneau-config` library contains a powerful API for
creating and using INI-style config files.\n\n**Key Capabiliti [...]
{"description": "The `juneau-config` library contains a powerful API for
creating and using INI-style config files.\n\n:::tip Example configuration
file\n```ini\n# A set of entries\n[Section1]\n\n# An integer\nkey1 = 1\n\n# A
boolean\nkey2 = true\n\n# An array\nkey3 = 1,2,3\n\n# A POJO\nkey4 =
http://bar\n```\n:::\n\nConfig files are accessed through the <a
href=\"/site/apidocs/org/apache/juneau/config/Config.html\"
target=\"_blank\">Config</a> class which are \ncreated through the <a hr [...]
{"description": "Each config file contains zero or more sections containing
zero or more entries:\n\n```ini\n[Section1]\nkey1 = 1\n\n[Section2]\nkey1 =
2\n```\n\nUnicode escapes can be used in values.\n\n```ini\nkey1 =
\\u0070\\u0075\\u0062\\u006c\\u0069\\u0063\n```\n\nComment lines start with the
'#' character and can be placed on lines before sections and
entries:\n\n```ini\n# A comment about this section\n[Section1]\n\n# A comment
about this entry\nkey1 = 1\n```\n\nComments can also b [...]
@@ -272,7 +277,7 @@
{"description": "# Listifiers\n\nListifiers convert collection-like objects
into lists for use in BCT assertions. They provide a unified way to work with
various collection types, iterators, streams, and other iterable data
structures.\n\n## Built-in Listifiers\n\nBCT comes with comprehensive built-in
listifiers for collection-like Java types:\n\n```java\n// Collection
types\nList<String> list = List.of(\"a\", \"b\", \"c\");\nassertList(list,
\"a\", \"b\", \"c\"); // Uses collectionList [...]
{"description": "# Swappers\n\nSwappers transform objects before they are
processed by BCT assertions. They provide a way to unwrap, evaluate, or
transform objects into more testable forms. Swappers are particularly useful
for wrapper types like Optional, Supplier, and Future.\n\n## Built-in
Swappers\n\nBCT comes with built-in swappers for common wrapper and
lazy-evaluation types:\n\n```java\n// Optional types\nOptional<String> optional
= Optional.of(\"Hello\");\nassertString(\"Hello\", [...]
{"description": "# Property Extractors\n\nProperty extractors define custom
property access logic for objects that don't follow standard JavaBean patterns
or require specialized property extraction. They provide a flexible way to
access properties from any object structure.\n\n## Overview\n\nProperty
extractors are used when:\n- Objects don't follow JavaBean getter
conventions\n- You need to compute properties dynamically\n- You want to
provide custom property names or aliases\n- Objects [...]
-{"description": "#### Maven Dependency\n\n```xml\n<dependency>\n
<groupId>org.apache.juneau</groupId>\n
<artifactId>juneau-rest-common</artifactId>\n
<version>${juneau.version}</version>\n</dependency>\n```\n\n#### Java
Library\n\n```text\njuneau-rest-common-0.0.0.jar\n```\n\n#### OSGi
Module\n\n```text\norg.apache.juneau.rest.common_0.0.0.jar\n```\n\n####
Contents/Features\n\nThe <a
href=\"/site/apidocs/org/apache/juneau/http/package-summary.html\"
target=\"_blank\">org.apache. [...]
+{"description": "`juneau-rest-common` ships as two sibling Maven
artifacts:\n\n| Artifact | Contents | Apache HttpClient 4.5 dependency?
|\n|---|---|---|\n| `juneau-rest-common` | Transport-neutral types under
`org.apache.juneau.http.*` and `org.apache.juneau.http.remote.*` \u2014
annotations, lazy header beans, remote-proxy meta, transport-neutral parts.
Used by every `juneau-rest-*` module. | **No.** Zero
`org.apache.httpcomponents:*` on the classpath. |\n|
`juneau-rest-common-classic` [...]
{"description": "The <a
href=\"/site/apidocs/org/apache/juneau/http/header/package-summary.html\"
target=\"_blank\">org.apache.juneau.http.header</a> package contains various
convenience classes for creating\nstandard HTTP components using static
imports.\n\n<tree>\n<node-0><java-class><a
href=\"/site/apidocs/org/apache/juneau/http/HttpHeaders.html\"
target=\"_blank\">HttpHeaders</a></java-class> - Utility class for standard
HTTP headers.</node-0>\n<node-0><java-class><a href=\"/site/api [...]
{"description": "The <a
href=\"/site/apidocs/org/apache/juneau/http/annotation/package-summary.html\"
target=\"_blank\">org.apache.juneau.http.annotation</a> package contains
annotations for defining both\nserver and client side APIs.\n\nThe server-side
APIs also use it for producing auto-generated Swagger documentation through the
REST API itself.\n\n<tree>\n<node-0><javac-annotation><a
href=\"/site/apidocs/org/apache/juneau/http/annotation/Contact.html\"
target=\"_blank\">Contact</a></ [...]
{"description": "The <a
href=\"/site/apidocs/org/apache/juneau/http/header/package-summary.html\"
target=\"_blank\">org.apache.juneau.http.header</a> package contains
implementations of\n`org.apache.http.Header` for all common HTTP
headers.\n\n<tree>\n<node-0><javac-class><a
href=\"/site/apidocs/org/apache/juneau/http/header/Accept.html\"
target=\"_blank\">Accept</a></javac-class> <javac-class><a
href=\"/site/apidocs/org/apache/juneau/http/header/AcceptCharset.html\"
target=\"_blank\">Ac [...]
@@ -338,7 +343,7 @@
{"description": "Since REST servlets are basically just `HttpServlets`,
incorporating them into an OSGi environment is pretty\nstraightforward.\n\nThe
following code shows how to register your REST servlets in an OSGi
Activator:\n\n```java\npackage org.apache.juneau.examples.rest;\n\nimport
org.osgi.framework.*;\nimport org.osgi.service.http.*;\nimport
org.osgi.util.tracker.*;\n\nimport org.apache.juneau.rest.samples.*;\n\n/**\n*
Activator class used when running samples as a bundle in a [...]
{"description": ":::warning Outdated examples (9.5)\nExamples on this page
using `RestContext.Builder` (constructor injection or `@RestInit`
parameter\ninjection) is pre-9.5 and kept only for historical context. The
Builder-injection protocol was\nremoved; migrate to `@Rest(...)` /
`@RestOp(...)` attributes, `@RestInject(name=\"...\")` bean\nsuppliers, and
`new RestContext(RestContextInit)` for programmatic bootstrap. See the\n[v9.5
Migration Guide](/docs/topics/V9.5MigrationGuide).\n::: [...]
{"description": "The <a
href=\"/site/apidocs/org/apache/juneau/rest/RestOpContext.html\"
target=\"_blank\">RestOpContext</a> object is the workhorse class for
an\nindividual <a
href=\"/site/apidocs/org/apache/juneau/rest/annotation/RestOp.html\"
target=\"_blank\">RestOp</a>-annotated method.\nEvery class annotated with <a
href=\"/site/apidocs/org/apache/juneau/rest/annotation/RestOp.html\"
target=\"_blank\">@RestOp</a> ends up with an instance of this
object.\n\nSimilar to <a href=\"/sit [...]
-{"description": "The REST Server API uses the concept of registered response
processors for converting objects returned by REST methods\nor set through <a
href=\"/site/apidocs/org/apache/juneau/rest/RestResponse.html#setContent(java.lang.Object)\"
target=\"_blank\">RestResponse.setContent(Object)</a> into appropriate HTTP
responses.\nBy default, REST resource classes are registered with the following
response processors:\n\n<tree>\n<node-0><java-class><a
href=\"/site/apidocs/org/apache/j [...]
+{"description": "The REST Server API uses the concept of registered response
processors for converting objects returned by REST methods\nor set through <a
href=\"/site/apidocs/org/apache/juneau/rest/RestResponse.html#setContent(java.lang.Object)\"
target=\"_blank\">RestResponse.setContent(Object)</a> into appropriate HTTP
responses.\nBy default, REST resource classes are registered with the following
response processors:\n\n<tree>\n<node-0><java-class><a
href=\"/site/apidocs/org/apache/j [...]
{"description": "The REST/RPC (RPC over REST) API allows the creation of
client-side remote proxy interfaces for calling methods on\nserver-side POJOs
using entirely REST.\n\n:::note\nThis is not to be confused with REST Proxies
which are entirely client-side driven Java interfaces\nagainst arbitrary
backend REST interfaces.\n:::\n\n#### Remote Interfaces\n\nThe following
example shows a remote interface:\n\n```java\n@RemoteInterface // Annotation is
optional\npublic interface IAddressBo [...]
{"description": "As mention earlier [here](/docs/topics/SerializingUris),
Juneau serializers have sophisticated support for transforming relative
URIs\nto absolute form.\nThe following example shows a REST method that returns
a list of URIs of various forms:\n\n```java\n@Rest(\n
uriAuthority=\"http://foo.com:123\",\n uriContext=\"/myContext\"\n)\npublic
class MyResource {\n\n @RestGet\n public URI[] getURIs() {\n
return new URI[] {\n URI.create(\"http://www. [...]
{"description": "The <a
href=\"/site/apidocs/org/apache/juneau/rest/beans/package-summary.html\"
target=\"_blank\">org.apache.juneau.rest.beans</a> package contains a set of
reusable utility beans meant to\nhelp with putting together explorable REST
interfaces.\n\nThe <a
href=\"/site/apidocs/org/apache/juneau/examples/rest/UtilityBeansResource.html\"
target=\"_blank\">UtilityBeansResource</a> class shows how these\nbeans are
used.\n\nThe resource class is hosted in the example REST appli [...]
@@ -375,10 +380,10 @@
{"description": "The <a
href=\"/site/apidocs/org/apache/juneau/rest/client/RestClient.Builder.html#basicAuth(java.lang.String,int,java.lang.String,java.lang.String)\"
target=\"_blank\">basicAuth()</a> method can be used to quickly enable BASIC
authentication support.\n\n:::tip Example\n```java\n// Create a client that
performs BASIC authentication using the specified user/pw.\nRestClient client =
RestClient.create()\n .basicAuth(HOST, PORT, USER, PW)\n
.build();\n```\n:::\n\nThis i [...]
{"description": "The <a
href=\"/site/apidocs/org/apache/juneau/rest/client/RestClient.Builder.html\"
target=\"_blank\">RestClient.Builder</a> class does not itself\nprovide
FORM-based authentication since there is no standard way of providing such
support.\nTypically, to perform FORM-based or other types of authentication,
you'll want to create your own subclass of <a
href=\"/site/apidocs/org/apache/juneau/rest/client/RestClient.Builder.html\"
target=\"_blank\">RestClient.Builder</a> and [...]
{"description": "The following example shows an implementation of a client
that performs OIDC authentication against the IBM
Jazz\nplatform.\n\n```java\n/**\n* Constructor.\n*/\npublic
JazzRestClient.Builder(URI jazzUri, String user, String pw) throws IOException
{\n ...\n}\n\n/**\n* Override the createHttpClient() method to return an
authenticated client.\n*/\n@Override /* RestClient.Builder */\nprotected
CloseableHttpClient createHttpClient() throws Exception {\n CloseableHttpCli
[...]
-{"description": ":::warning Beta API\nAll public types under
`org.apache.juneau.ng.*` are **beta**. Source- and binary-incompatible
changes\nmay appear in the next major Juneau release. For production
deployments that require strict\nbinary stability, continue using the classic
`RestClient` / `juneau-rest-common` APIs until the\nNG stack is declared stable
in a future release.\n:::\n\nJuneau 9.5.0 introduces a next-generation REST
client and HTTP type stack under\n`org.apache.juneau.ng.* [...]
+{"description": ":::warning Beta API\nThe canonical types in
`org.apache.juneau.rest.client.*`, `org.apache.juneau.rest.mock.*`,
and\n`org.apache.juneau.http.*` are **beta**. Source- and binary-incompatible
changes may appear in the\nnext major Juneau release. For production
deployments that require strict binary stability, use the\nclassic stack in
`juneau-rest-client-classic` (`org.apache.juneau.rest.client.classic.*`) \u2014
it\nremains the supported, HC4.5-based `RestClient` for the [...]
{"description": "#### Maven Dependency\n\n```xml\n<dependency>\n
<groupId>org.apache.juneau</groupId>\n
<artifactId>juneau-rest-mock</artifactId>\n
<version>${juneau.version}</version>\n</dependency>\n```\n\n#### Java
Library\n\n```text\njuneau-rest-mock-0.0.0.jar\n```\n\n#### OSGi
Module\n\n```text\norg.apache.juneau.rest.mock_0.0.0.jar\n```\n\n####
Contents/Features\n\nThe `juneau-rest-mock` module contains convenience APIs
for performing serverless unit testing of your REST A [...]
-{"description": "The <a
href=\"/site/apidocs/org/apache/juneau/rest/mock/MockRestClient.html\"
target=\"_blank\">MockRestClient</a> class is used for performing\nserverless
unit testing of <a
href=\"/site/apidocs/org/apache/juneau/rest/annotation/Rest.html\"
target=\"_blank\">@Rest</a>-annotated and <a
href=\"/site/apidocs/org/apache/juneau/http/remote/Remote.html\"
target=\"_blank\">@Remote</a>-annotated classes.\n\nThe <a
href=\"/site/apidocs/org/apache/juneau/rest/mock/MockRestClient. [...]
-{"description": "#### Maven Dependency\n\n```xml\n<dependency>\n
<groupId>org.apache.juneau</groupId>\n
<artifactId>juneau-microservice-core</artifactId>\n
<version>${juneau.version}</version>\n</dependency>\n```\n\n#### Java
Library\n\n```text\njuneau-microservice-core-0.0.0.jar\n```\n\n#### OSGi
Module\n\n```text\norg.apache.juneau.microservice.core_0.0.0.jar\n```\n\n####
Contents/Features\n\nJuneau Microservice is an API for creating stand-alone
executable jars with automatic [...]
+{"description": "The <a
href=\"/site/apidocs/org/apache/juneau/rest/mock/classic/MockRestClient.html\"
target=\"_blank\">MockRestClient</a> class is used for performing\nserverless
unit testing of <a
href=\"/site/apidocs/org/apache/juneau/rest/annotation/Rest.html\"
target=\"_blank\">@Rest</a>-annotated and <a
href=\"/site/apidocs/org/apache/juneau/http/remote/Remote.html\"
target=\"_blank\">@Remote</a>-annotated classes.\n\n:::info Two flavors of
`MockRestClient`\n- `org.apache.juneau.r [...]
+{"description": "#### Maven Dependency\n\n```xml\n<dependency>\n
<groupId>org.apache.juneau</groupId>\n
<artifactId>juneau-microservice</artifactId>\n
<version>${juneau.version}</version>\n</dependency>\n```\n\n#### Java
Library\n\n```text\njuneau-microservice-0.0.0.jar\n```\n\n#### OSGi
Module\n\n```text\norg.apache.juneau.microservice_0.0.0.jar\n```\n\n####
Contents/Features\n\nJuneau Microservice is an API for creating stand-alone
executable jars with automatic support for Ju [...]
{"description": "The Microservice API consists of a base class for defining
executable microservices.\n\nFeatures include:\n\n- A builder-based API for
defining and starting microservices.\n- An extensible API that allows you to
hook into various lifecycle events.\n- Simple-to-use APIs for accessing
manifest file entries, command-line arguments, and external configuration file
properties.\n\nThe Microservice API consists of the following packages and
classes:\n\n<tree>\n<node-0>Microserv [...]
{"description": "Command-line arguments can be associated with a microservice
using the <a
href=\"/site/apidocs/org/apache/juneau/microservice/Microservice.Builder.html#args(java.lang.String...)\"
target=\"_blank\">args()</a> method.\n\n:::tip Example\n```java\npublic static
void main(String[] args) {\n Microservice\n .create() //
Create builder.\n .args(args) // Pass in args.\n .build()
// Create microservice.\n .start() [...]
{"description": "The <a
href=\"/site/apidocs/org/apache/juneau/microservice/Microservice.Builder.html#manifest(java.lang.Object)\"
target=\"_blank\">Microservice.Builder.manifest(Object)</a>\nmethod can be
used to specify the contents or location of of the main manifest file of the
executable jar.\nIf you do not specify the location/contents of the manifest
file, the microservice will attempt to resolve it through\nthe following
methods: - Looking on the file system for a file at `META-I [...]
@@ -386,16 +391,16 @@
{"description": "The Microservice API incorporates the [Simple Variable
Language](/docs/topics/SimpleVariableLanguageBasics) API.\nThe variable
resolver can be augmented through the following
methods:\n\n<tree>\n<node-0><java-class><a
href=\"/site/apidocs/org/apache/juneau/microservice/Microservice.Builder.html\"
target=\"_blank\">Microservice.Builder</a></java-class></node-0>\n<node-1><java-method><a
href=\"/site/apidocs/org/apache/juneau/microservice/Microservice.Builder.html#vars(java
[...]
{"description": "The Microservice API provides support for simple console
commands.\n\n```java\npublic static void main(String[] args) {\n
Microservice\n .create()\n .args(args)\n .build()\n
.start()\n .startConsole() // Start console.\n .join()\n
;\n}\n```\n\nWhen started, the console renders the following
output:\n\n```bash\nRunning class 'Microservice' using config file
'my-microservice.cfg'.\n\nList of available commands:\n exit - [...]
{"description": "As mentioned previously, the lifecycle methods for the <a
href=\"/site/apidocs/org/apache/juneau/microservice/Microservice.html\"
target=\"_blank\">Microservice</a> class are explicitly defined as non-final so
that they can be overridden by subclasses.\nIn addition to this support, an
interface for defining event listeners for your
microservice:\n\n<tree>\n<node-0><java-class><a
href=\"/site/apidocs/org/apache/juneau/microservice/Microservice.Builder.html\"
target=\"_bla [...]
-{"description": "Starting with **9.5.0**, the <a
href=\"/site/apidocs/org/apache/juneau/microservice/Microservice.html\"
target=\"_blank\">Microservice</a>\nclass is **inject-aware**. Every
microservice owns an internal\n<a
href=\"/site/apidocs/org/apache/juneau/commons/inject/WritableBeanStore.html\"
target=\"_blank\">WritableBeanStore</a> (accessible via\n<a
href=\"/site/apidocs/org/apache/juneau/microservice/Microservice.html#getBeanStore()\"
target=\"_blank\">getBeanStore()</a>),\np [...]
+{"description": "Starting with **9.5.0**, the <a
href=\"/site/apidocs/org/apache/juneau/microservice/Microservice.html\"
target=\"_blank\">Microservice</a>\nclass is **inject-aware**. Every
microservice owns an internal\n<a
href=\"/site/apidocs/org/apache/juneau/commons/inject/WritableBeanStore.html\"
target=\"_blank\">WritableBeanStore</a> (accessible via\n<a
href=\"/site/apidocs/org/apache/juneau/microservice/Microservice.html#getBeanStore()\"
target=\"_blank\">getBeanStore()</a>),\np [...]
{"description": "#### Maven Dependency\n\n```xml\n<dependency>\n
<groupId>org.apache.juneau</groupId>\n
<artifactId>juneau-microservice-jetty</artifactId>\n
<version>${juneau.version}</version>\n</dependency>\n```\n\n#### Java
Library\n\n```text\njuneau-microservice-jetty-0.0.0.jar\n```\n\n#### OSGi
Module\n\n```text\norg.apache.juneau.microservice.jetty_0.0.0.jar\n```\n\n####
Contents/Features\n\nJuneau Microservice Jetty is an API for creating
stand-alone executable jars that [...]
-{"description": "The Jetty Microservice API consists of a combination of the
Juneau Core, Server, and Client APIs and an embedded Eclipse\nJetty Servlet
Container.\n\nThe API builds upon the Core Microservices classes to produce
easy-to-create and easy-to-use microservices in a standard\nJava 1.8+
environment.\n\nThe `juneau-microservice-jetty` library consists of the
following classes:\n\n<tree>\n<node-0><a
href=\"/site/apidocs/org/apache/juneau/microservice/jetty/package-summary.html\"
[...]
+{"description": "The Jetty Microservice API consists of a combination of the
Juneau Core, Server, and Client APIs and an embedded Eclipse\nJetty Servlet
Container.\n\nThe API builds upon the
[juneau-microservice](JuneauMicroserviceBasics) classes to produce
easy-to-create and\neasy-to-use microservices in a standard Java 17+
environment.\n\n> **Renamed in 9.5** \u2014 `juneau-microservice-core` is now
published as `juneau-microservice`. The Jetty module is no\n> longer a
subclass of `Mi [...]
{"description": "The lifecycle methods of the <a
href=\"/site/apidocs/org/apache/juneau/microservice/Microservice.html\"
target=\"_blank\">Microservice</a> class\nconsists of the
following:\n\n<tree>\n<node-0><java-class><a
href=\"/site/apidocs/org/apache/juneau/microservice/Microservice.html\"
target=\"_blank\">Microservice</a></java-class></node-0>\n<node-1><javac-method><a
href=\"/site/apidocs/org/apache/juneau/microservice/Microservice.html#start()\"
target=\"_blank\">start()</a></ja [...]
-{"description": "This section describes how to define a top-level REST
resource page and deploy it in our microservice.\nThe example is a router page
that serves as a jumping off page to child resources.\n\n```java\n@Rest(\n
path=\"/*\",\n title=\"My Microservice\",\n description=\"Top-level
resources page\",\n htmldoc=@HtmlDoc(\n navlinks={\n
\"options: servlet:/?method=OPTIONS\"\n }\n ),\n children={\n
HelloWorldResource.class,\n [...]
+{"description": "This section describes how to define a top-level REST
resource page and deploy it in our microservice.\nThe example is a router page
that serves as a jumping off page to child resources.\n\n```java\n@Rest(\n
path=\"/*\",\n title=\"My Microservice\",\n description=\"Top-level
resources page\",\n htmldoc=@HtmlDoc(\n navlinks={\n
\"options: servlet:/?method=OPTIONS\"\n }\n ),\n children={\n
HelloWorldResource.class,\n [...]
{"description": "The following predefined resource classes are also provided
for easy inclusion into your microservice:\n\n<tree>\n<node-0>Predefined
Resource Classes</node-0>\n<node-1><java-class><a
href=\"/site/apidocs/org/apache/juneau/microservice/resources/ConfigResource.html\"
target=\"_blank\">ConfigResource</a></java-class> - View and modify the
external INI config file</node-1>\n<node-1><java-class><a
href=\"/site/apidocs/org/apache/juneau/microservice/resources/DirectoryResourc
[...]
{"description": "The following methods can be used to define the configuration
for your microservice using the powerful `Config`
API:\n\n<tree>\n<node-0><java-class><a
href=\"/site/apidocs/org/apache/juneau/microservice/Microservice.Builder.html\"
target=\"_blank\">Microservice.Builder</a></java-class></node-0>\n<node-1><java-method><a
href=\"/site/apidocs/org/apache/juneau/microservice/Microservice.Builder.html#config(org.apache.juneau.config.Config)\"
target=\"_blank\">config(Config)</ [...]
-{"description": "The Jetty microservice comes with a bare-bones `jetty.xml`
file which can be modified to suite any needs.\n\nThe `jetty.xml` can be
located in either the `.` or `files` working directory or classpath.\n\nIt can
also be specified in any of the following ways:\n\n- Using the <a
href=\"/site/apidocs/org/apache/juneau/microservice/jetty/JettyMicroservice.Builder.html#jettyXml(java.lang.Object,boolean)\"
target=\"_blank\">JettyMicroservice.Builder.jettyXml(Object,boolean)</a> [...]
+{"description": "The Jetty microservice comes with a bare-bones `jetty.xml`
file which can be modified to suite any needs.\n\nThe `jetty.xml` can be
located in either the `.` or `files` working directory or classpath.\n\nIt can
also be specified in any of the following ways:\n\n- Supplying a `@Bean
JettySettings` whose `jettyXml(Object, boolean resolveVars)` builder method
sets the\n raw XML contents (and optionally requests SVL
var-resolution).\n\n```java\n@Configuration\npublic class [...]
{"description": "The Microservice project contains a `files/htdocs` folder
with predefined stylesheets and images.\nThese files can be used to tailor the
look-and-feel of your
microservice.\n\n```text\nhttp://localhost:10000/helloWorld\n```\n\nThe REST
configuration section of your microservice configuration file can be used to
tailor the header and footer on\nthe
pages:\n\n```ini\n#==========================================================================================================
[...]
-{"description": "This example shows how the <a
href=\"/site/apidocs/org/apache/juneau/microservice/jetty/JettyMicroservice.html\"
target=\"_blank\">JettyMicroservice</a>\nclass can be extended to implement
lifecycle listener methods or override existing methods.\nWe'll create a new
class `com.foo.MyJettyMicroservice`.\n\n```java\n/**\n* Sample subclass of a
JettyMicroservice that provides customized behavior.\n*/\npublic class
MyJettyMicroservice extends JettyMicroservice {\n\n public [...]
+{"description": "In 9.5 `JettyMicroservice` was retired \u2014
`juneau-microservice-jetty` now contributes a
single\n[JettyConfiguration](MicroserviceJettyOverview) class that wires Jetty
into the standard\n[Microservice](JuneauMicroserviceBasics). Customization is
therefore done by **contributing your own\n`@Bean` definitions** rather than
subclassing.\n\n#### Hooking into the lifecycle\n\nImplement
[`MicroserviceListener`](MicroserviceCoreListeners) and expose it as a `@Bean`
\u2014 e [...]
{"description": "#### Starter Project Zip\n\nThe `my-jetty-microservice.zip`
file is a predefined starter Eclipse project for developing REST microservices
using the\njuneau-microservice-jetty package.\n\nIt includes a combination of
the Juneau Core, Server, and Client APIs and all libraries needed to execute in
a Java 1.8+\nenvironment.", "id": "topic:abaff88702e0", "module": "01",
"related_ids": [], "source_path":
"pages/topics/16.01.MyJettyMicroserviceBasics.md", "source_type": "topic [...]
{"description": "Follow these instructions to create a new template project in
Eclipse.\n\n- Download the `my-jetty-microservice-9.1.0.zip` file from the
downloads page (located in the binaries) and import it into your workspace as
an existing project:\n\n\n\n- Select
the archive file and import the project:\n\n\n\n- In your
workspace, you shou [...]
{"description": "The mjm.launch file is already provided to allow you to
quickly start your new microservice.\nGo to **Run -> Run Configurations -> Java
Application -> my-jetty-microservice** and click **Run**.\nIn your console
view, you should see the following output:\n\n```bash\nRunning class
'JettyMicroservice' using config file 'mjm.cfg'.\nServer started on port
10000\n\nList of available commands:\n exit -- Shut down service\n
restart -- Restarts service\n help -- Commands [...]
@@ -415,10 +420,10 @@
{"description": "# juneau-examples-rest-springboot\n\nThe
[juneau-examples-rest-springboot](https://github.com/apache/juneau/tree/master/juneau-examples/juneau-examples-rest-springboot)
module demonstrates how to integrate Apache Juneau REST servers with Spring
Boot for enterprise-grade microservice applications.\n\n## Overview\n\nThis
example shows how to leverage Spring Boot's powerful features while using
Juneau's REST capabilities. It demonstrates Spring Boot integration patterns,
de [...]
{"description": "Juneau provides **shaded (uber) JAR artifacts** that bundle
multiple Juneau modules into single JAR files. These artifacts simplify
dependency management and are especially useful for build systems like Bazel
that require explicit dependency declarations.\n\n## What Are Shaded
Artifacts?\n\nShaded artifacts use the [Maven Shade
Plugin](https://maven.apache.org/plugins/maven-shade-plugin/) to:\n- Bundle
multiple Juneau modules into a single JAR\n- Merge service provider f [...]
{"description": "The `juneau-shaded-core` artifact bundles all core Juneau
modules for general marshalling and configuration work. At 2.0 MB, it's the
smallest shaded artifact and ideal for applications that don't need REST
functionality.\n\n## What's Included\n\nThis artifact includes the following
Juneau modules:\n\n- **juneau-commons** - Core utilities and common classes\n-
**juneau-assertions** - Fluent-style assertions API\n- **juneau-bct** -
Bean-Centric Testing framework\n- **june [...]
-{"description": "The `juneau-shaded-rest-client` artifact bundles all core
Juneau modules plus REST client functionality. At 3.8 MB, it provides
everything needed for building REST client applications.\n\n## What's
Included\n\nThis artifact includes:\n\n- **All modules from
[juneau-shaded-core](/docs/topics/JuneauShadedCore)** (marshalling, config,
testing)\n- **juneau-rest-common** - REST APIs common to client and server\n-
**juneau-rest-client** - Full-featured REST client API\n- **jun [...]
+{"description": "The `juneau-shaded-rest-client` artifact bundles all core
Juneau modules plus REST client functionality. At 3.8 MB, it provides
everything needed for building REST client applications.\n\n## What's
Included\n\nThis artifact includes:\n\n- **All modules from
[juneau-shaded-core](/docs/topics/JuneauShadedCore)** (marshalling, config,
testing)\n- **juneau-rest-common** - REST APIs common to client and server\n-
**juneau-rest-client** - Transport-agnostic REST client (no Apa [...]
{"description": "The `juneau-shaded-rest-server` artifact bundles all core
Juneau modules plus REST server functionality. At 3.8 MB, it provides
everything needed for building REST server applications.\n\n## What's
Included\n\nThis artifact includes:\n\n- **All modules from
[juneau-shaded-core](/docs/topics/JuneauShadedCore)** (marshalling, config,
testing)\n- **juneau-rest-common** - REST APIs common to client and server\n-
**juneau-rest-server** - Full-featured REST servlet API\n- **ju [...]
{"description": "The `juneau-shaded-rest-server-springboot` artifact bundles
REST server functionality plus Spring Boot integration. At 3.8 MB, it provides
everything needed for building Juneau REST services with Spring Boot.\n\n##
What's Included\n\nThis artifact includes:\n\n- **All modules from
[juneau-shaded-rest-server](/docs/topics/JuneauShadedRestServer)** (core + REST
server)\n- **juneau-rest-server-springboot** - Spring Boot auto-configuration
and integration\n\n## Use Cases\n\n [...]
-{"description": "The `juneau-shaded-all` artifact is the complete Juneau
framework bundled in a single 4.0 MB JAR file. It includes all core modules,
REST client, REST server, Spring Boot integration, bean DTOs, and microservice
modules.\n\n## What's Included\n\nThis artifact includes **everything**:\n\n###
Core Modules\n- **juneau-commons** - Core utilities\n- **juneau-assertions** -
Fluent assertions API\n- **juneau-bct** - Bean-Centric Testing framework\n-
**juneau-config** - Configur [...]
+{"description": "The `juneau-shaded-all` artifact is the complete Juneau
framework bundled in a single 4.0 MB JAR file. It includes all core modules,
REST client, REST server, Spring Boot integration, bean DTOs, and microservice
modules.\n\n## What's Included\n\nThis artifact includes **everything**:\n\n###
Core Modules\n- **juneau-commons** - Core utilities\n- **juneau-assertions** -
Fluent assertions API\n- **juneau-bct** - Bean-Centric Testing framework\n-
**juneau-config** - Configur [...]
{"description": "Security is always an ongoing concern in any library.\n\nIf
you discover any security vulnerabilities in this code, please refer to the
instructions found here:
[SECURITY](https://github.com/apache/juneau/blob/master/SECURITY.md)", "id":
"topic:d97f8256180a", "module": "01", "related_ids": [], "source_path":
"pages/topics/21.01.SecurityBasics.md", "source_type": "topic", "summary":
"Security is always an ongoing concern in any library.", "tags": ["topic",
"01"], "title": [...]
{"description": "#### Demarshalling vulnerabilities\n\nOne common security
vulnerability is the ability to create arbitrary Java object instances through
crafted user input.\n\nFor example, support for constructing POJOs based on an
input attribute defining a fully-qualified class name
like\n`{class:'com.foo.MyBean',...}`\n\nFortunately, Juneau does not support an
open-ended `class` attribute.\n\nAs a rule, it should not be possible to create
arbitrary POJOs by any of the parsers.\n\nThe [...]
{"description": "Care must be used when defining new <a
href=\"/site/apidocs/org/apache/juneau/commons/svl/Var.html\"
target=\"_blank\">Vars</a> using the SVL API since mistakes\ncould potentially
expose system properties, environment variables, or even file system
files.\n\nFor recap, the SVL support allows you to embed variables of the form
`$X{key}` inside strings that get resolved to other\nstrings.\n\nThe resolved
strings themselves can also contain variables that also get recursive [...]
diff --git a/static/ai/manifest.json b/static/ai/manifest.json
index 57c64f4493..11a8a6599e 100644
--- a/static/ai/manifest.json
+++ b/static/ai/manifest.json
@@ -1,10 +1,10 @@
{
- "generated_at": "content-hash:31615e466e43",
- "record_count": 428,
+ "generated_at": "content-hash:2840531993b6",
+ "record_count": 433,
"schema_version": "1.0.0",
"source_commit": {
- "juneau": "aeec23af210d89c31d6c88d6c699f523c69a9ac1",
- "juneau_docs": "79d3ab6d95ec5bbb373e62aa6980e347cb673461"
+ "juneau": "65655cfbab542fb423efe0e0348b976c5226e319",
+ "juneau_docs": "a2471197b8c58c2ea23dd60335f108a2dcb07fd4"
},
"version": "9.5.0"
}
diff --git a/static/ai/taxonomy.json b/static/ai/taxonomy.json
index 7ec57a80ba..9351e13bd3 100644
--- a/static/ai/taxonomy.json
+++ b/static/ai/taxonomy.json
@@ -8,10 +8,10 @@
"06": 10,
"07": 12,
"08": 9,
- "09": 7,
- "10": 15,
- "11": 16,
- "12": 4,
+ "09": 8,
+ "10": 16,
+ "11": 17,
+ "12": 5,
"13": 5,
"14": 7,
"15": 4,
@@ -44,6 +44,7 @@
"40": 1,
"41": 1,
"42": 1,
+ "43": 1,
"Module-juneau-marshall-rdf": 1,
"api-metadata": 16,
"general": 1,
@@ -53,6 +54,6 @@
"source_types": {
"api-metadata": 16,
"release-note": 84,
- "topic": 328
+ "topic": 333
}
}