[
https://issues.apache.org/jira/browse/AVRO-2749?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17264847#comment-17264847
]
ASF subversion and git services commented on AVRO-2749:
-------------------------------------------------------
Commit e8db541f0c343d5f5f0773f7cec687a83cee3698 in avro's branch
refs/heads/dependabot/nuget/lang/csharp/Microsoft.NET.Test.Sdk-16.8.3 from Joel
Turkel
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=e8db541 ]
AVRO-2998: Schema validation for hashes with symbol keys (#1036)
AVRO-2749 added support for serializing hashes with symbol keys but they were
still considered invalid. This fixes schema validation to also accept hashes
with symbol keys.
> The Avro ruby gem is unable to encode hashes with non-string keys
> -----------------------------------------------------------------
>
> Key: AVRO-2749
> URL: https://issues.apache.org/jira/browse/AVRO-2749
> Project: Apache Avro
> Issue Type: Improvement
> Components: ruby
> Affects Versions: 1.9.2
> Reporter: Justin Lambert
> Assignee: Justin Lambert
> Priority: Major
> Fix For: 1.10.0
>
>
> When trying to encode a ruby hash which uses symbols, an error is raised
> because the key lookup is expecting a string only.
> {code:java}
> { id: 4, name: "foo"} =>
> The datum nil is not an example of schema "long"
> (Avro::IO::AvroTypeError){code}
> This error is a bit cryptic and since ruby supports all simple data types as
> hash keys, all keys should be converted to strings before encoding.
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)