Skip to content

Commit 840e684

Browse files
webdevelopersdiarygermanattanasio
authored andcommitted
Fix to have TaxonomyTypeAdapter's write() method produce output that's also accepted by its read() method. (#230)
1 parent e75c6c1 commit 840e684

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/ibm/watson/developer_cloud/alchemy/v1/util/TaxonomyTypeAdapter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ public void write(JsonWriter writer, Taxonomy value) throws IOException {
7878

7979
if (value.getScore() != null)
8080
writer.name("score").value(value.getScore());
81-
if (value.getConfident() != null)
82-
writer.name("confident").value(value.getConfident());
81+
if (value.getConfident() == false)
82+
writer.name("confident").value("no");
8383
if (value.getLabel() != null)
8484
writer.name("label").value(value.getLabel());
8585

0 commit comments

Comments
 (0)