MARS v.1.6.4 released!

What’s new

Since last release (v.1.6.3, April 2026) I’ve added a number of new functionalities to MARS and I also tried to build a few demos around them. Apart from this, a few critical bugs and issues have been addressed in this release.

Let’s have a look at the most important changes.

Bug fixing

  • some critical issues (introduced with v.1.6.3) with Post method for TMARSClientResourceJSON have been solved
  • some Delphi JSON handling of string and numbers has been addressed and this has fixed some weird behaviors in TMARSParameters (used in JWT token claims too)
  • some JSON serialization options were not applied consistently through the RTTI based capabilities and MessageBodyWriters mechanisms (more to come in this area)

New demos and technologies

  • SSEDemo: Delphi 13.1 introduced SSE support in Indy and WebBroker so now there’s a handy wrapper in MARS around this functionality. Server and client side support has been added to MARS v.1.6.4 and a demo showcasing the functionalities is there.
  • To properly implement SSE support, a new TMARSHttpClient (based on Embarcadero THttpClient) is provided. A new TMARSClientResource descendant (TMARSClientResourceSSE) is also available to deal with SSE on the client side.
  • WebStencilsDemo: server side templating has some significant strenghts when building web applications (but not only!). Delphi has a WebStencils library included and now MARS has a significant integration with it.
  • HtmxDemo: htmx technology is very popular and can easily be used together with MARS to implement web applications. A simple example is provided while more integration may come in the future.

Other changes

  • I’ve updated mORMot extracted sources (mORMotJWT module to handle JWT on the Windows side without OpenSSL dependencies)
  • New JSON serialization capabilities (TList<TPair<string,T>), used in OpenAPI serialization to guarantee member’s ordering in OpenAPI spec (replaced use of dictionaries that caused messy ordering)
  • Improvements and reworking around TMARSJSONSerializationOptions and its default settings

Beware

Especially about JSON serialization options, be sure to check new behavior is suitable for your projects. I would say it is hard to choose a proper default that fits every case, so I decided to add an explicit settings of JSON serialization options in Server.Ignition.pas unit. This will keep every project from changes in the library’s defaults and make settings more explicit.

MARS.Core.JSON.DefaultMARSJSONSerializationOptions.IncludeEmptyOrNullValues;

Server.Ignition.pas, line 70

More features are coming to MARS in the next few weeks, stay tuned!

Sincerely,

Andrea

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.