Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Comments

@smeadows-abb
Copy link

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
},

      {
        "name": "shortDescription",
        "type": ["null", "string"],
        "default": null
      },

      {
        "name": "longDescription",
        "type": ["null", "string"],
        "default": null
      },
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant