You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@avro.apache.org by Lars Francke <la...@gmail.com> on 2010/02/10 11:23:44 UTC

Metadata in Java Schema class

Hi,

I've got a question about "metadata" in JSON schemas. According to the
specification "Attributes not defined in this document are permitted
as metadata, but must not affect the format of serialized data." What
I'd like to know is if this metadata is somehow made available in the
Schema (or Schema.Field) class. I had a look and I don't think so but
perhaps I'm missing something.

Is there any easy way to access this metadata and associate it with
the correct Schema/Fields? If not would you object against a patch
that extends the parse function to also save metadata and make it
available?

Cheers,
Lars

Re: Metadata in Java Schema class

Posted by Lars Francke <la...@gmail.com>.
On Wed, Feb 10, 2010 at 16:55, Philip Zeyliger <ph...@cloudera.com> wrote:
> Is Schema.getProp() what you're looking for?

I had to look in the source (previously I only looked at the current
Javadoc) and yes...that does indeed seem to be what I wanted.

Thank you very much for the hint! Guess I'll just wait for the next
release then.

Lars

Re: Metadata in Java Schema class

Posted by Philip Zeyliger <ph...@cloudera.com>.
Is Schema.getProp() what you're looking for?

-- Philip

On Wed, Feb 10, 2010 at 2:23 AM, Lars Francke <la...@gmail.com>wrote:

> Hi,
>
> I've got a question about "metadata" in JSON schemas. According to the
> specification "Attributes not defined in this document are permitted
> as metadata, but must not affect the format of serialized data." What
> I'd like to know is if this metadata is somehow made available in the
> Schema (or Schema.Field) class. I had a look and I don't think so but
> perhaps I'm missing something.
>
> Is there any easy way to access this metadata and associate it with
> the correct Schema/Fields? If not would you object against a patch
> that extends the parse function to also save metadata and make it
> available?
>
> Cheers,
> Lars
>