Skip to main content

Juneau Marshall

One bean. Every format.

import org.apache.juneau.marshall.marshaller.*;

public class Person {
public String name = "John Smith";
public int age = 21;
}

String json = Json.of(new Person());
String xml = Xml.of(new Person());
String yaml = Yaml.of(new Person());

Person back = Json.to(json, Person.class);
{"age":21,"name":"John Smith"}
<object><age>21</age><name>John Smith</name></object>
age: 21
name: John Smith
  • One API for 38 formats, each both serialized and parsed: JSON, JSON5, XML, HTML, YAML, CSV, UON, MessagePack, TOML, Protobuf and more, including 12 RDF syntaxes (juneau-marshall-rdf).
  • One annotation model (@BeanType, @BeanProp) across every format.
  • Round-trip parsing back to the same beans.
  • Swaps for types you can't annotate.
  • No required dependencies: juneau-marshall needs only juneau-commons.

Modules: juneau-marshall, juneau-marshall-rdf

Read more →