Closed swamisriman closed 5 months ago
The examples look correct to me. The spec says:
The keys of JSON objects are field names converted to lowerCamelCase. Original field names are not valid to use as keys for JSON objects. For example, this is a valid JSON representation of a Resource: { "attributes": {...}, "droppedAttributesCount": 123 }, and this is NOT a valid representation: { "attributes": {...}, "dropped_attributes_count": 123 }.
Yes @tigrannajaryan
The examples are fine. I was using wrong package to marshall and unmarshall jsons
Ref: https://github.com/open-telemetry/opentelemetry-proto-go/issues/176#issuecomment-2147055182
Thanks for looking into this!!
The JSON keys in the example files use camel case where as the fields are defined in .proto files in snake case. This is causing issues with JSON parsing. For reference, see issue: https://github.com/open-telemetry/opentelemetry-proto-go/issues/176