{title:'Marshallers'}

{@link oaj.marshaller.Marshaller Marshallers} are simple pairings of a {@link oaj.serializer.Serializer} and {@link oaj.parser.Parser} with convenience methods for serializing and parsing POJOs.

Examples:

| // Using instance. | Json json = new Json(); | MyPojo myPojo = json.read(string, MyPojo.class); | String string = json.write(myPojo);

| // Using DEFAULT instance. | MyPojo myPojo = Json.DEFAULT.read(string, MyPojo.class); | String string = Json.DEFAULT.write(myPojo);

Juneau comes with the following predefined marshallers:

Each predefined marshaller also includes static convenience from/to methods to make it even easier to perform marshalling on POJOs:

Examples:

| // Using shortcut static methods. | MyPojo myPojo = Json.to(jsonString, MyPojo.class); | String json = Json.of(myPojo);