avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Burger <tvbur...@gmail.com>
Subject avro doesn't print the doc attribute
Date Fri, 18 Nov 2011 15:41:19 GMT
Hi all,

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?

Regards, Tom

-- 
Tom Burger | tvburger@gmail.com | +31 (0)62 412 20 27
http://www.linkedin.com/in/tvburger

Mime
View raw message