5.0.0.0 (Jun 11, 2012)

Version 5.0 marks a major release milestone for the Juno/JJSON library. It is now available for download from iRAM under the name "Juno (previously JJSON)". The Juno Starters Guide has been updated to reflect new functionality in this release.

- New name.
  Unfortunately, "JJSON" was already trademarked by another similar library. Therefore, it's been renamed "Juno" (after the Roman goddess and wife of Jupiter) which does not appear to have any similar trademark issues (crosses fingers). The name is also a play on the word "Uno", indicating that this is a single simple unifying interface of several kinds of technology.
- Simplified APIs for working with beans.
  Significant improvements have been made to the parsers to make it easier to convert serialized POJOs back into their original forms.
- Serializer/Parser classes now directly subclass from {@link oaj.BeanContext}.
  In previous releases, if you wanted to change the way beans were handled by the serializers and parsers, you had to construct a separate bean map factory and pass it to the serializer or parser. Now, you can call the bean map factory methods directly on the serializer or parser class.
- Simplified Filter API for handling non-standard POJOs.
  The API for handling non-standard POJOs has been simplified by introducing the concept of a Transform class, which is associated with the BeanContext class (and thus the Serializer and Parser classes too) through the BeanContext.addTransforms(Class[]) method.
  Two new subclasses of Transform:
  - BeanFilter - Filter POJO beans.
  - PojoSwap - Filter POJOs that aren't beans.
  This new API replaces the previous separate Cast and BeanFilter APIs which were considerably more complicated and puts them under a common API.
- Elimination of _class attributes in parsable output.
  One of the complaints about the previous version of JJSON was that if you wanted to have the resulting JSON or XML be parsable back into beans, you had to enable the "addClassAttrs" property on the bean map factory class so that "_class" attributes could be added to the output.
  This requirement is virtually eliminated in v5. In many cases, the parsers are able to determine through reflection what the correct target type is based on the top-level class passed in on the parse method.
- Performance improvements.
  Several significant performance improvements have been made in this release.
  - New Reader-based JSON parser.
    Previously, the JSON parser required that the entire JSON text be loaded into memory as a String before being parsed. The new JSON parser is Reader-based which significantly reduces memory consumption.
  - New StAX-based XML parser.
    The old XML parser was based on DOM. The new XML parser uses a StAX parser which significantly reduces memory consumption.
  - Caching of reflection data in the BeanMap API.
    The number of reflection calls have been significantly reduced in the BeanMap API code. Reflection is used to determine the class types of property values on beans. This information is now cached and persisted so that the reflection API calls to determine class types are only performed the first time a bean type is encountered.
  - Automatic support for GZIP compression/decompression in RestServlets.
    This is completely transparent to the developer. The output writer is negotiated by the framework to automatically handle compression and charset requests without the developer needing to know anything about it.
- Cognos/XML support.
- JSON-schema support.
- New PojoIntrospector class.
- Significant REST servlet API improvements.
  - Defining child resources is considerably simpler now. In addition to the standard doX() methods for handling the requests for the current resource, you can also define getX() methods for returning child resources which automatically become available under the child URL specified by the getter name.
  - Initialization of the child resources occurs automatically when the parent resource initialization occurs.
  - Other improvments have been made in the area of automatic negotiation of input and output type streams. For example, automatic support is provided for GZIP (Accept-Encoding: gzip) and charsets (e.g Accept-Charset: SJIS) on both incoming and outgoing data. It's all transparent from a developers perspective. The developer simply working with POJOs, and all details about content types, encoding, charsets, and so forth are handled by the framework.
  - Support for generating complex OPTIONS pages for resources.
- Automatic support for SOAP XML output on "text/soap+xml" requests against RestServlet.
- Support for XML namespaces.
- Support for setting the XML root element name by either passing in a parameter on the serializer, or by specifying it via a @Bean annotation.
- Support for loading beans directly from Readers and Strings.
- Parsing support for POJOs of type Enum.
- Significant improved support for various flavors of parameterized types, such as subclasses of parameterized types (e.g. MyBeanList extends LinkedList<MyBean>).
- Improved ordering of bean properties (should now be ordered as they are defined in the class).
- Various default filters provided:
  - byte[]<-->Base64 encoded strings
  - Date/Calendar<-->ISO8601/RFC822/Long
- New {@link oaj.html.HtmlParser} and {@link oaj.urlencoding.UrlEncodingParser} classes.
- HtmlSerializer now produces XHTML.