On 11/18/2011 07:41 AM, Tom Burger wrote:
> I need the doc attribute to be printed, but it won't. (I know that the
> doc is only allowed on records, fields and enums).
> 
>         org.apache.avro.Schema avroSchema =
>             org.apache.avro.Schema
>                 .parse("{ \"type\": \"enum\", \"doc\": \"test\",
> \"name\": \"abc\", \"symbols\": [ \"aa\" ]}");
>         System.out.println(avroSchema.getDoc());
>         System.out.println(avroSchema.toString());
> 
> outputs:
> 
> test
> {"type":"enum","name":"abc","symbols":["aa"]}
> 
> So the doc has been omitted. Is this a bug or a feature?

That was a bug prior to 1.5.1, fixed in AVRO-296:

http://svn.apache.org/viewvc?view=revision&revision=1087463

Are you perhaps using a version prior to 1.5.1?

Thanks,

Doug


Reply via email to