github launchdarkly/java-server-sdk 5.4.0

latest releases: 7.4.0, 7.3.0, 7.2.6...
3 years ago

[5.4.0] - 2021-04-22

Added:

  • Added the alias method to LDClient. This can be used to associate two user objects for analytics purposes with an alias event.
  • In com.launchdarkly.sdk.json.LDGson, added convenience methods valueToJsonElement and valueMapToJsonElementMap for applications that use Gson types.
  • In com.launchdarkly.sdk.LDValue, added convenience method arrayOf().

Changed:

  • In com.launchdarkly.sdk.json, the implementations of LDGson.typeAdapters and LDJackson.module have been changed for better efficiency in deserialization. Instead of creating an intermediate string representation and re-parsing that, they now have a more direct way for the internal deserialization logic to interact with the streaming parser in the application's Gson or Jackson instance.

Fixed:

  • Gson.toJsonTree now works with LaunchDarkly types, as long as you have configured it as described in com.launchdarkly.sdk.json.LDGson. Previously, Gson was able to convert these types to and from JSON string data, but toJsonTree did not work due to a known issue with the JsonWriter.jsonValue method; the SDK code no longer uses that method.
  • LDValue.parse() now returns LDValue.ofNull() instead of an actual null reference if the JSON string is null.
  • Similarly, when deserializing an EvaluationDetail<LDValue> from JSON, if the value property is null, it will now translate this into LDValue.ofNull() rather than an actual null reference.

Don't miss a new java-server-sdk release

NewReleases is sending notifications on new releases.