aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/research/JsonUtils.java
diff options
context:
space:
mode:
authorKurt Partridge <kep@google.com>2013-06-14 17:03:03 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-06-14 17:03:03 +0000
commit14718ab898e2f23b078b9f25aa234c1e673517c7 (patch)
tree50d27cd81e6de45322023e2433491e29dc210b5e /java/src/com/android/inputmethod/research/JsonUtils.java
parent0052dbda762b1871c3214a6abeb5e89f11e091cd (diff)
parentfc98325c61e5df3845f3d2b4906b0af301204b73 (diff)
downloadlatinime-14718ab898e2f23b078b9f25aa234c1e673517c7.tar.gz
latinime-14718ab898e2f23b078b9f25aa234c1e673517c7.tar.xz
latinime-14718ab898e2f23b078b9f25aa234c1e673517c7.zip
Merge "Log score, kind, and sourceDict for manual suggestion and gesture"
Diffstat (limited to 'java/src/com/android/inputmethod/research/JsonUtils.java')
-rw-r--r--java/src/com/android/inputmethod/research/JsonUtils.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/research/JsonUtils.java b/java/src/com/android/inputmethod/research/JsonUtils.java
index 24cd8d935..63d524df7 100644
--- a/java/src/com/android/inputmethod/research/JsonUtils.java
+++ b/java/src/com/android/inputmethod/research/JsonUtils.java
@@ -94,12 +94,17 @@ import java.util.Map;
.value(words.mIsPunctuationSuggestions);
jsonWriter.name("isObsoleteSuggestions").value(words.mIsObsoleteSuggestions);
jsonWriter.name("isPrediction").value(words.mIsPrediction);
- jsonWriter.name("words");
+ jsonWriter.name("suggestedWords");
jsonWriter.beginArray();
final int size = words.size();
for (int j = 0; j < size; j++) {
final SuggestedWordInfo wordInfo = words.getInfo(j);
- jsonWriter.value(wordInfo.toString());
+ jsonWriter.beginObject();
+ jsonWriter.name("word").value(wordInfo.toString());
+ jsonWriter.name("score").value(wordInfo.mScore);
+ jsonWriter.name("kind").value(wordInfo.mKind);
+ jsonWriter.name("sourceDict").value(wordInfo.mSourceDict);
+ jsonWriter.endObject();
}
jsonWriter.endArray();
jsonWriter.endObject();