Package org.apache.juneau.marshall.json5l


package org.apache.juneau.marshall.json5l
JSON5L (JSON5 Lines) marshalling support.

JSON5L combines the relaxed JSON5 dialect (comments, unquoted/single-quoted keys, trailing commas, relaxed numbers) with JSONL's newline-delimited framing (one document per line).

This package provides Json5lSerializer and Json5lParser. The serializer emits strict RFC-8259 JSON per line by default (byte-identical to JsonlSerializer), with an opt-in for JSON5 sugar. The parser accepts the full JSON5 dialect per line — and, because JSON5 is a strict superset of JSON, plain JSONL input as well.

Example:

// Serialize a list of beans to JSON5L String json5l = Json5l.of(myList); // Parse JSON5L back to a list List<MyBean> list = Json5l.to(json5l, List.class, MyBean.class);

See Also: