diff --git a/src/test/kotlin/com/github/avrokotlin/avro4k/schema/AvroJsonPropSchemaTest.kt b/src/test/kotlin/com/github/avrokotlin/avro4k/schema/AvroJsonPropSchemaTest.kt index d4ec9dd0..2a1a6516 100644 --- a/src/test/kotlin/com/github/avrokotlin/avro4k/schema/AvroJsonPropSchemaTest.kt +++ b/src/test/kotlin/com/github/avrokotlin/avro4k/schema/AvroJsonPropSchemaTest.kt @@ -46,6 +46,17 @@ class AvroJsonPropSchemaTest : WordSpec() { data class AnnotatedProperties( @AvroJsonProp("guns", """["and", "roses"]""") val str: String, @AvroJsonProp("jean", """["michel", "jarre"]""") val long: Long, + @AvroJsonProp( + key = "object", + jsonValue = """{ + "a": "foo", + "b": 200, + "c": true, + "d": null, + "e": { "e1": null, "e2": 429 }, + "f": ["bar", 404, false, null, {}] + }""" + ) val int: Int ) diff --git a/src/test/resources/props_json_annotation_field.json b/src/test/resources/props_json_annotation_field.json index a5a21835..88db680c 100644 --- a/src/test/resources/props_json_annotation_field.json +++ b/src/test/resources/props_json_annotation_field.json @@ -15,7 +15,15 @@ }, { "name": "int", - "type": "int" + "type": "int", + "object": { + "a": "foo", + "b": 200, + "c": true, + "d": null, + "e": { "e1": null, "e2": 429 }, + "f": [ "bar", 404, false, null, {} ] + } } ] }