-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement /sdk/v2/flags API call and LoadStoreCache for flag configurations #31
Implement /sdk/v2/flags API call and LoadStoreCache for flag configurations #31
Conversation
…build.gradle, update toFlag() util
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you rename the evaluation-core
directory evaluation
, very uncommon to have -
characters in java package names.
sdk/src/main/java/com/amplitude/evaluation-core/EvaluationAllocation.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! One last change.
val jsonArray = JSONArray(body) | ||
val flags = mutableMapOf<String, EvaluationFlag>() | ||
(0 until jsonArray.length()).forEach { | ||
val jsonString = jsonArray.getJSONObject(it).toString() | ||
val flag = json.decodeFromString<EvaluationFlag>(jsonString) | ||
flags[flag.key] = flag | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
val jsonArray = JSONArray(body) | |
val flags = mutableMapOf<String, EvaluationFlag>() | |
(0 until jsonArray.length()).forEach { | |
val jsonString = jsonArray.getJSONObject(it).toString() | |
val flag = json.decodeFromString<EvaluationFlag>(jsonString) | |
flags[flag.key] = flag | |
} | |
val flags = json.decodeFromString<List<EvaluationFlag>>(body) | |
.associateBy { it.key } |
No description provided.