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

Serialize schemas feature #400

Open
ludovic-pourrat opened this issue May 17, 2024 · 3 comments
Open

Serialize schemas feature #400

ludovic-pourrat opened this issue May 17, 2024 · 3 comments

Comments

@ludovic-pourrat
Copy link

Hi,
We currently leverage the hamba/avro to resolve our schemas and their dependencies and we need a feature to serialize the schemas once resolved, this is pretty useful when storing the schemas within a registry, like confluent or apicurio.

ludovic-pourrat added a commit to ludovic-pourrat/avro that referenced this issue May 17, 2024
ludovic-pourrat added a commit to ludovic-pourrat/avro that referenced this issue May 17, 2024
ludovic-pourrat added a commit to ludovic-pourrat/avro that referenced this issue May 17, 2024
ludovic-pourrat added a commit to ludovic-pourrat/avro that referenced this issue May 17, 2024
ludovic-pourrat added a commit to ludovic-pourrat/avro that referenced this issue May 17, 2024
ludovic-pourrat added a commit to ludovic-pourrat/avro that referenced this issue May 17, 2024
ludovic-pourrat added a commit to ludovic-pourrat/avro that referenced this issue May 17, 2024
@nrwiersma
Copy link
Member

The scheme can already be marshalled into JSON or in canonical form. Your proposed PR cannot work, as it would instantly break in the case of a circular schema.

@ludovic-pourrat
Copy link
Author

The scheme can already be marshalled into JSON or in canonical form. Your proposed PR cannot work, as it would instantly break in the case of a circular schema.

Could you point me to the method to use ?
Thanks.

@nrwiersma
Copy link
Member

for marshalling to JSON, you literally just use json.Marshal. For canonical form, use the String method on the schema.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants