You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 30, 2024. It is now read-only.
Is your feature request related to a problem? Please describe.
I would like to have the ability use Gson or other json serialization library in order to serialize/deserialize LDUser
and transfer it between microservices.
Describe the solution you'd like
I think that as you already have Gson serialization, just need deserialization that takes the created LDUser and
set LDValue null in case that the specific field is null
Additional context
I tried just to use LDUser ldUser = GSON.fromJson(ldUserStr, LDUser.class);
but then I receive NPE with the following stacktrace:
java.lang.NullPointerException: null
at com.launchdarkly.client.LDUser$UserAdapterWithPrivateAttributeBehavior.write(LDUser.java:201)
at com.launchdarkly.client.LDUser$UserAdapterWithPrivateAttributeBehavior.write(LDUser.java:180)
at com.google.gson.Gson.toJson(Gson.java:704)
at com.launchdarkly.client.EventOutputFormatter.writeUser(EventOutputFormatter.java:186)
at com.launchdarkly.client.EventOutputFormatter.writeOutputEvent(EventOutputFormatter.java:81)
at com.launchdarkly.client.EventOutputFormatter.writeOutputEvents(EventOutputFormatter.java:31)
at com.launchdarkly.client.DefaultEventProcessor$SendEventsTask.run(DefaultEventProcessor.java:644)
I am using version 4.12.1 of the library.
Thanks, David.