Small but impactful update!
<dependencies>
<dependency>
<groupId>org.ugp.serialx</groupId>
<artifactId>serialx-json</artifactId>
<version>1.3.9</version> <!-- Specify newer version if needed -->
</dependency>
</dependencies>
<repositories>
<repository>
<id>github</id>
<url>https://maven.pkg.github.com/SimplyProgrammer/Java-SerialX</url>
</repository>
</repositories>
What was added:
Notable changes:
- A new, far performant, reading and lexing method was written for parsing, resulting in almost 2x improvement when deserializing a large amount of data.
- Serializer now provides an option to implement a custom code formatting flag, including the option to disable formatting entirely (so no indentation or new line blank characters will be present).
- DataConverter
CharSequence toString(ParserRegistry myHomeRegistry, Object obj, Object... args)
was changed toAppendable toString(Appendable source, ParserRegistry myHomeRegistry, Object obj, Object... args) throws IOException
where now, instead of creating the string from the object and returning it, you are supposed to append it directly into the provided source. In this way, you do not have to create your own StringBuilders.- This is far more optimal, and together with formatting flags, results in 2x, sometimes even 3x increase in performance when serializing, especially with larger amounts of data.
- Key Serializer methods, LoadFrom and SerializeTo were renamed to camel case (original PascalCase was largely a legacy thing...).
- JsonVariableConverter was added as JSON-specific variant of VariableConverter.
- ArrayConverter now supports proper serializing of 0 and 1 length arrays (@ identifier for arrays).
- Slight default formatting changes (';' is no longer used for the last element, similarly to JSON).
- Other smaller optimizations and API improvements.
- hashCode for GenericScope
- Deprecateds were removed...
- More Unit/Integration tests...
- Minor bug fixes and Javadoc improvements.