form v3.0.0 Release Notes

Release Date: 2017-07-31 // almost 4 years ago
  • What's new?

    • ➕ Added Embedded struct support
    • ➕ Added omitempty just like std lib JSON

    Made a version bump to v3.0.0 because the new Embedded struct logic has the potential to affect existing clients.

    0️⃣ The Encoder has a new option SetAnonymousMode(...) by default it embeds anonymous struct info as if the fields were part of the containing struct itself; to continue to have it split out the Embedded structs just set mode to AnonymousSeparate and it will function exactly as previous versions.

    👀 please see examples detailing new functionality.

    NOTE: if a struct and embedded struct have the same field, this will decode the value into both fields as there is no way to tell which you want; decoding into only the Embedded struct is still supported, again see examples.

    🍱 Thanks to @danielchatfield and @michael2m for creating issues to get these features on the radar 👍