{title:'OpenAPI Methodology', updated:'8.2.0'}
Unlike the other Juneau serializers and parsers that convert input and output directly to-and-from POJOs,
the OpenAPI serializers and parsers use intermediate objects based on the
The following table shows the "natural" intermediate type of the object based on the
Type | Format | Intermediate Java Type |
---|---|---|
binary binary-spaced |
||
date-time |
{@link java.util.Calendar} | |
No intermediate type. (serialized directly to/from POJO) |
||
empty | {@link java.lang.String} | |
empty | {@link java.lang.Boolean} | |
{@link java.lang.Integer} | ||
{@link java.lang.Long} | ||
{@link java.lang.Float} | ||
{@link java.lang.Double} | ||
empty | Arrays of intermediate types on this list. | |
No intermediate type. (serialized directly to/from POJO) |
||
empty | ||
No intermediate type. (serialized directly to/from POJO) |
The valid POJO types for serializing/parsing are based on the intermediate types above. As a general rule, any POJOs that are the intermediate type or transformable to or from the intermediate type are valid POJO types.
For example, the following POJO type can be transformed to and from a byte array.
|
This example shows how that POJO can be converted to a BASE64-encoded string.
|
In addition to defining format, the schema also allows for validations of the serialized form.
|
It looks simple but the implementation is highly sophisticated being able to serialize and parse and validate using complex schemas.
The next sections go more into depth on serializing and parsing various POJO types.