Skip to content

Conversation

@bfabio
Copy link
Member

@bfabio bfabio commented Aug 21, 2025

Add json struct tags so we can serialize the struct to JSON and use it to pass the data around from the Go code to the various language bindings as a simple char*, instead of wrapping the whole type.

Unfortunately the yaml library doesn't allow us to use the same tag, and we end up duplicating them:
go-yaml/yaml#424

This duplication should be temporary, as goccy/go-yaml supports the json tags for YAML serialization (#221).

Add json struct tags so we can serialize the struct to JSON
and use it to pass the data around from the Go code to the various
language bindings as a simple char*, instead of wrapping the whole
type.

Unfortunately the yaml library doesn't allow us to use the same
tag, and we end up duplicating them:
go-yaml/yaml#424

This duplication should be temporary, as goccy/go-yaml supports the
json tags for YAML serialization (italia#221).
@bfabio bfabio merged commit 579bfaa into italia:main Aug 21, 2025
3 checks passed
@bfabio bfabio deleted the json-tags branch August 21, 2025 07:00
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

Successfully merging this pull request may close these issues.

1 participant