Deserialize avro messages to JSON and preserve field order
Hey,
is it possible to deserialize an avro message to a JSON / text format which also preserves the order of the fields as defined in the avro schema? Currently I unmarshal the avro message to an interface{} and then I apply json.Unmarshal() on it which works fine, but the fields are ordered alphabetically rather than in the order as defined in the schema.
Hi,
No. This repo does not handle the text representation at all, it is entirely focused on the binary representation.
@nrwiersma Thanks for the speedy response. Would you accept PRs for such a method that or is this something you don't want to have as part of this library. Unfortunately I don't see a workaround, because the field order information is lost after the unmarshal process I believe.
I would accept PRs for this feature, but I would put it in a json package to not pollute the main codebase.