Conversation
|
@tianxiaoliang Thanks for the contribution! I'm trying to find some time to test it out so I can get it merged. |
marshal.go
Outdated
| @@ -106,7 +106,13 @@ func parsePort(s string) int { | |||
| func (i *InstanceMetadata) UnmarshalJSON(b []byte) error { | |||
| i.Raw = b | |||
| // TODO(cq) could actually parse Raw here, and in a parallel UnmarshalXML as well. | |||
There was a problem hiding this comment.
Update the comment to note the only outstanding proposal: unmarshal the XML. You took care of the first proposal here.
|
Done |
| func (ins *Instance) SetMetadataString(key, value string) { | ||
| if ins.Metadata.parsed == nil { | ||
| ins.Metadata.parsed = map[string]interface{}{} | ||
| if ins.Metadata.Parsed == nil { |
There was a problem hiding this comment.
Given that we can set entries in this field, "Parsed" doesn't match its use. "Parsed" implies that we only receive these values.
Again, consider renaming it to "Map", "Fields", "Values", or something similar.
|
@tianxiaoliang Would you like to address @seh comments here. I want this to be merged ;) Please also make sure that tests are working after the change for JSON. |
No description provided.