Raj Hassani
Raj Hassani

Reputation: 1677

How to put default values for a map in AVRO IDL

I have a record and in the record there is a map and I want to put a default value for a map. I was looking at this link but there is no example with a map http://avro.apache.org/docs/1.7.5/idl.html

Upvotes: 2

Views: 2916

Answers (1)

ppearcy
ppearcy

Reputation: 2772

All default values should be defined in JSON serialization format.

So, a record with a default map would look like:

record DefaultMap {
  map<string> test = {"Hello" : "world", "Merry" : "Christmas"};
}

Upvotes: 4

Related Questions