https://www.growthbook.io/ logo
#ask-questions
Title
# ask-questions
b

broad-sandwich-73687

11/01/2023, 6:08 AM
hi GB team, I am from majid al futtaim carrefour. We are utilising Growthbook cloud based solution. We are facing an issue while fetching feature flag value. And getting below exception in growthbook-sdk-java. The java sdk version is 0.5.0. The feature flag is of boolean type. Expected a com.google.gson.JsonObject but was com.google.gson.JsonPrimitive; at path $ com.google.gson.JsonSyntaxException: Expected a com.google.gson.JsonObject but was com.google.gson.JsonPrimitive; at path $ at com.google.gson.internal.bind.TypeAdapters$34$1.read(TypeAdapters.java:920) at com.google.gson.Gson.fromJson(Gson.java:991) at com.google.gson.Gson.fromJson(Gson.java:956) at com.google.gson.Gson.fromJson(Gson.java:905) at com.google.gson.Gson.fromJson(Gson.java:876) at growthbook.sdk.java.GBFeaturesRepository.initialize(GBFeaturesRepository.java:142)
1
r

rhythmic-agent-34208

11/01/2023, 6:08 AM
@blue-sundown-32899 has marked the issue as closed. Reopen Issue button
Our official support hours are 9am - 5pm Pacific Time, Monday through Friday. You may occasionally hear from us outside of these hours. Your support request has been logged in our system. Our support team will get back to you very soon!
f

fresh-football-47124

11/01/2023, 7:32 AM
Can you share the code and the SDK payload?
b

broad-sandwich-73687

11/01/2023, 12:32 PM
hi @fresh-football-47124 thanks for the response. Please find the funtion below. This function is being called during the request processing and in isON we are passing String key similar to- "oms_loyalty_points"
Copy code
public Boolean getFeatureFlagBooleanValue(String featureFlagName) {
    GrowthBook growthBook = this.getFeatureToggleInstance();
    return growthBook.isOn(featureFlagName);
}
r

rhythmic-agent-34208

11/01/2023, 8:18 PM
Hello, Vijay, thanks for sending the function you're using. The Java SDK is maintained by external contributors. Could you please submit an issue to the repo so they can address it?
b

broad-sandwich-73687

11/02/2023, 6:59 AM
ok @brief-honey-45610. let me do that.
r

rhythmic-agent-34208

11/02/2023, 2:58 PM
Great, thank you!
2 Views