Revanth14 commented on code in PR #2361:
URL: https://github.com/apache/iceberg-go/pull/2361#discussion_r4460669188


##########
types.go:
##########
@@ -431,13 +431,28 @@ func (s *StructType) Equals(other Type) bool {
 
 func (s *StructType) Fields() []NestedField { return s.FieldList }
 
-func (s *StructType) MarshalJSON() ([]byte, error) {
-       type Alias StructType
+// The JSON methods of the nested types name every serialized field instead of
+// encoding through an alias of the type, so the wire format does not depend on
+// which Go fields are exported.
 
+func (s *StructType) MarshalJSON() ([]byte, error) {

Review Comment:
   Done in the latest commit: `Schema.MarshalJSON` and `UnmarshalJSON` now name 
`schema-id` and `identifier-field-ids` directly, in the same key order, so the 
bytes don't change. With both fields tagged `json:"-"`, `main` drops the two 
keys and fails `TestSchemaRoundTrip`, while this branch passes.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to