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

Please provide end-to-end examples #1

Closed
kartiksura opened this issue Mar 19, 2015 · 7 comments
Closed

Please provide end-to-end examples #1

kartiksura opened this issue Mar 19, 2015 · 7 comments
Assignees

Comments

@kartiksura
Copy link

Please provide a basic tutorial to use the package, maybe on the lines of http://avro.apache.org/docs/1.7.7/gettingstartedjava.html

I am specially interested Serializing multiple objects in a file.

@karrick
Copy link
Contributor

karrick commented Mar 19, 2015

I have updated goavro's README with a limitations section. The plan is to implement helper routings in goavro that handle Avro Object Container Files. I have written code that does this, including compression handling, but removed the methods from the official release until I get a better grip on what that API should look like.

I'm open to how others think the API should look like.

Any suggestions?

@karrick
Copy link
Contributor

karrick commented Mar 19, 2015

I didn't want to leave you hanging for your original question, about having end-to-end examples for encoding data.

Not only does the README.md file have examples for creating codecs, encoding, and decoding data, the test files in the repository provide numerous examples of encoding and decoding data using goavro.

@karrick karrick closed this as completed Mar 19, 2015
@pm-kartik-sura
Copy link

There are test cases but there isnt a single example to use the library easily. I would love to see examples for:

  1. Defining a simple schema and encoding and decoding the object
  2. Defining a complex schema (with nested records) and encoding and decoding the object

Something on the lines of https://github.com/stealthly/go-avro/tree/master/examples would help me in a big way.

@thomasdesr thomasdesr reopened this Mar 25, 2015
@karrick
Copy link
Contributor

karrick commented Mar 25, 2015

I have added a few examples that demonstrate encoding and decoding both simple and complex schema, including nested records.

Thanks for your feedback about missing examples. I hope these help.

@karrick
Copy link
Contributor

karrick commented Mar 25, 2015

By the way, I'll leave this issue open until I have file API also included in goavro, along with examples.

If you'd like to see any additional examples, please feel free to ask.

@karrick karrick self-assigned this Mar 25, 2015
@pm-kartik-sura
Copy link

Excellent examples.
I was able to serialize complex use cases such as:

  1. record in a record
  2. Array of records in a record
  3. Arrays

@karrick
Copy link
Contributor

karrick commented Mar 26, 2015

I have added a few examples in the examples directory, updated the README.md with examples, and added additional examples in godoc.

Please let me know if you have any additional examples you'd like to see.

@karrick karrick closed this as completed Mar 26, 2015
karrick pushed a commit that referenced this issue Aug 9, 2016
eliminate data race in codec around primitive codecs
karrick pushed a commit that referenced this issue Feb 18, 2018
karrick pushed a commit that referenced this issue Aug 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants