[ 
https://issues.apache.org/jira/browse/AVRO-4028?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17871448#comment-17871448
 ] 

Karyna Bilotska commented on AVRO-4028:
---------------------------------------

simplified scheme example (map in the map)


{code:java}
{
"name": "propertyName",
"type": [
    "null",
    {
        "type": "map",
        "values": {
            "type": "map",
            "values": [
                "null",
                {
                    "type": "record",
                    "name": "Foo",
                    "doc": "Foo model",
                    "fields": [
                        {
                            "name": "name",
                            "type": [
                                "null",
                                "string"
                            ],
                            "doc": "Name",
                            "default": null
                        },
                        {
                            "name": "surname",
                            "type": [
                                "null",
                                "string"
                            ],
                            "doc": "Surname",
                            "default": null
                        }
                    ]
                }
            ]
        }
    }
],
"doc": "Some description and additional info",
"default": null
} {code}

> Avro.AvroException: Unable to find type 'IDictionary<string, Foo>' in all 
> loaded assemblies
> -------------------------------------------------------------------------------------------
>
>                 Key: AVRO-4028
>                 URL: https://issues.apache.org/jira/browse/AVRO-4028
>             Project: Apache Avro
>          Issue Type: Bug
>            Reporter: Karyna Bilotska
>            Priority: Major
>
> Here is an issue with Avro ISpecificRecord deserializing while using the 
> Avro.Specific library.
> Scheme: *map in the map* (the simplified scheme example will be added in 
> comments below)
> C# gererated property for ISpecificRecord: 
> {code:java}
> IDictionary<string,IDictionary<string,Foo>> _changes;{code}
> {*}Problem{*}: Avro.Specific for .NET (C#) does not support nested 
> IDictionary property deserializing (for example, IDictionary<string, 
> IDictionary<string, Foo>>).
> The following error is raised when trying to deserialize the property I 
> described above.  
>  
> {code:java}
> Avro.AvroException: Unable to find type 'IDictionary<string, Foo>' in all 
> loaded assemblies{code}
>  
> Here are also a couple of related *open* issues we found: * 
> [https://stackoverflow.com/questions/56983940/how-to-handle-deserializing-avro-map-type-in-c-sharp]
>  * [https://github.com/confluentinc/confluent-kafka-dotnet/issues/2019]
>  *Additional info:* 
> We use Confluent.SchemaRegistry.Serdes.Avro (Version="2.3.0), which use 
> *Apache.Avro*  *(Version="1.11.0")* under the hood.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to