Skip to content
This repository was archived by the owner on Jan 22, 2019. It is now read-only.
This repository was archived by the owner on Jan 22, 2019. It is now read-only.

Similar to issue #6, MapWriteContext.createChildObjectContext() should call _schema.getValueType() #23

@shoeree

Description

@shoeree

Hello!

I was attempting to serialize an Avro record containing a "map" with record-type values, and encountered this error:

JsonMappingException: Not an array: <redacted>

... I see that in Issue #6, deserializing the "map" type appears to call getElementType(). In MapWriteContext.java, getElementType() is also called, like so:

@Override
public final AvroWriteContext createChildObjectContext() throws JsonMappingException
{
    _verifyValueWrite();
    AvroWriteContext child = _createObjectContext(_schema.getElementType());
    _data.put(_currentName, child.rawValue());
    return child;
}

Shouldn't this instead use _schema.getValueType()?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions