Open
Conversation
added 2 commits
December 12, 2025 10:13
… was missing before
…rnal handling of numeric values to json.Number; see #78185
martinrode
requested changes
Dec 16, 2025
pkg/lib/jsutil/json.go
Outdated
Comment on lines
39
to
40
| commentRegex := regexp.MustCompile(`(?m)^[\t ]*#.*$`) | ||
| tmplBytes := commentRegex.ReplaceAll(input, []byte{}) |
Contributor
There was a problem hiding this comment.
den regexp bitte mal als top level variable. ich glaube wir sehen hier gerade den grund warum das apitest tool manchmal so lahm erscheint, insbesondere beim json parsen.
Contributor
There was a problem hiding this comment.
und schau mal ob es irgendwoanders noch solche fälle gibt wo ständig regexp compiliert werden (das ist sehr teuer)
pkg/lib/jsutil/json.go
Outdated
| // wrappers for consistency | ||
| // also to remove unnecessary imports of "encoding/json" | ||
| func Marshal(v any) (data []byte, err error) { | ||
| return json.Marshal(v) |
Contributor
There was a problem hiding this comment.
hier kannst du mal golib.JsonBytes "klauen", json.Marshal hat komische defaults wenn es html marschallen soll.
pkg/lib/jsutil/json.go
Outdated
| } | ||
|
|
||
| func Encode(w io.Writer, v any) (err error) { | ||
| return json.NewEncoder(w).Encode(v) |
Contributor
There was a problem hiding this comment.
auch hier, siehe golib.JsonBytes (html false oder so setzen)
added 11 commits
December 17, 2025 11:04
… after using linter; see #78185
…json.Number; see #78185
…explicit casting in apitest cases is necessary; see #78185
…tion, not the numerical value; see #78185
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
json.Numbersee #78185