Marshalls

{@link oaj.marshall.Marshall Marshalls} are simple pairings of a {@link oaj.serializer.Serializer} and {@link oaj.parser.Parser} with convenience methods for serializing and parsing POJOs.

- {@link oaj.marshall.Marshall}
  - {@link oaj.marshall.Marshall#read(Object,Class) read(Object,Class)}
  - {@link oaj.marshall.Marshall#read(Object,Type,Type...) read(Object,Type,Type...)}
  - {@link oaj.marshall.Marshall#write(Object) write(Object)}
  - {@link oaj.marshall.Marshall#write(Object,Object) write(Object,Object)}
  - {@link oaj.marshall.Marshall#toString(Object) toString(Object)}
  - {@link oaj.marshall.Marshall#println(Object) println(Object)}

Marshalls are often cleaner to use on-the-fly since they have simplified names.

The following shows the {@link oaj.marshall.Json} marshall in action:

##### 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);

Marshalls exist for all supported languages:

- {@link oaj.marshall.Marshall}
  - {@link oaj.marshall.CharMarshall}
    - {@link oaj.marshall.Html}
    - {@link oaj.marshall.Json}
    - {@link oaj.marshall.PlainText}
    - {@link oaj.marshall.SimpleJson}
    - {@link oaj.marshall.Uon}
    - {@link oaj.marshall.UrlEncoding}
    - {@link oaj.marshall.Xml}
    - {@link oaj.marshall.N3}
    - {@link oaj.marshall.NTriple}
    - {@link oaj.marshall.RdfXml}
    - {@link oaj.marshall.RdfXmlAbbrev}
    - {@link oaj.marshall.Turtle}
  - {@link oaj.marshall.StreamMarshall}
    - {@link oaj.marshall.Jso}
    - {@link oaj.marshall.MsgPack}