diff options
Diffstat (limited to 'java/com/google/gerrit/json/OutputFormat.java')
-rw-r--r-- | java/com/google/gerrit/json/OutputFormat.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/java/com/google/gerrit/json/OutputFormat.java b/java/com/google/gerrit/json/OutputFormat.java index a2d174f4cc..3e7c319aa7 100644 --- a/java/com/google/gerrit/json/OutputFormat.java +++ b/java/com/google/gerrit/json/OutputFormat.java @@ -55,7 +55,8 @@ public enum OutputFormat { GsonBuilder gb = new GsonBuilder() .setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES) - .registerTypeAdapter(Timestamp.class, new SqlTimestampDeserializer()); + .registerTypeAdapter(Timestamp.class, new SqlTimestampDeserializer()) + .registerTypeAdapterFactory(new EnumTypeAdapterFactory()); if (this == OutputFormat.JSON) { gb.setPrettyPrinting(); } |