Skip to content

Conversation

@radeksimko
Copy link
Member

Prior to this patch, any, such as

InputConfig map[string]any `json:"input_config,omitempty"`

would get decoded into float64. As we cannot know ahead of time the requirements for the numbers in these structures, we should apply more cautious approach and retain numbers as json.Number rather than assume they can all be safely decoded into float64.

This follows a behaviour implemented in #26 that was made opt-in mostly for backwards-compatible reasons but many important downstream consumers do opt-in. Which is to say that it probably would've been a default behaviour there as well if we weren't concerned about backwards compatibility.

This new interface for log messages was released only recently (yesterday) and so while it strictly speaking implies a breaking change, it should not impact (m)any consumers in reality.

@radeksimko radeksimko force-pushed the f-logging-json-number branch from b912b45 to 47acc88 Compare September 17, 2025 10:42
@radeksimko radeksimko force-pushed the f-logging-json-number branch from 47acc88 to 2121e62 Compare September 17, 2025 10:44
@radeksimko radeksimko marked this pull request as ready for review September 17, 2025 10:45
@radeksimko radeksimko requested review from a team as code owners September 17, 2025 10:45
@radeksimko radeksimko enabled auto-merge (squash) September 17, 2025 10:45
@radeksimko radeksimko merged commit ef5e0b8 into main Sep 17, 2025
14 checks passed
@radeksimko radeksimko deleted the f-logging-json-number branch September 17, 2025 10:51
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.

2 participants