You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Question: Record "com.epiphany.avro.data" field "thumbnailUrl": default value ought to encode using field schema: cannot encode binary bytes: expected: string; received: <nil>]
#218
Open
smeadows-abb opened this issue
Aug 24, 2020
· 0 comments
I have 3 optional "string" data elements within my json, the following excerpt shows these fields from AVRO schema defines, during compilation I receive " cannot encode binary bytes: expected: string; received: ". I'm unsure how these field should be defined:
CODE:
codec, err := goavro.NewCodec(EntityMap.Schema)
if err != nil {
logger.Warning("schemaID=" + EntityMap.GUID + " " + err.Error())
return err
}
_, _, err = codec.NativeFromTextual(message)
if err != nil {
logger.Warning("schemaID=" + EntityMap.GUID + " " + err.Error())
return err
}
AVRO:
{
"name": "thumbnailUrl",
"type": ["null", "string"],
"default": null
},
I have 3 optional "string" data elements within my json, the following excerpt shows these fields from AVRO schema defines, during compilation I receive " cannot encode binary bytes: expected: string; received: ". I'm unsure how these field should be defined:
CODE:
codec, err := goavro.NewCodec(EntityMap.Schema)
if err != nil {
logger.Warning("schemaID=" + EntityMap.GUID + " " + err.Error())
return err
}
_, _, err = codec.NativeFromTextual(message)
if err != nil {
logger.Warning("schemaID=" + EntityMap.GUID + " " + err.Error())
return err
}
AVRO:
{
"name": "thumbnailUrl",
"type": ["null", "string"],
"default": null
},
The text was updated successfully, but these errors were encountered: