diff --git a/tapx-json/src/main/java/com/howardlewisship/tapx/json/JSONModule.java b/tapx-json/src/main/java/com/howardlewisship/tapx/json/JSONModule.java index 6d76656..95b63f1 100644 --- a/tapx-json/src/main/java/com/howardlewisship/tapx/json/JSONModule.java +++ b/tapx-json/src/main/java/com/howardlewisship/tapx/json/JSONModule.java @@ -45,6 +45,7 @@ public static void standardJSONEncoders(MappedConfiguration configuration.add(JSONObject.class, identity); configuration.add(JSONArray.class, identity); configuration.add(JSONString.class, identity); + configuration.add(void.class, identity); configuration.addInstance(Iterable.class, IterableJSONEncoder.class); configuration.addInstance(Map.class, MapJSONEncoder.class); diff --git a/tapx-json/src/test/groovy/json/tests/JSONEncoderTests.groovy b/tapx-json/src/test/groovy/json/tests/JSONEncoderTests.groovy index ebb0792..df3fc17 100644 --- a/tapx-json/src/test/groovy/json/tests/JSONEncoderTests.groovy +++ b/tapx-json/src/test/groovy/json/tests/JSONEncoderTests.groovy @@ -33,5 +33,6 @@ class JSONEncoderTests extends Specification { false | false true | true 3.75f | 3.75f + null | null } }