-
Notifications
You must be signed in to change notification settings - Fork 2
High numbers 78185 #95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
… was missing before
…rnal handling of numeric values to json.Number; see #78185
pkg/lib/jsutil/json.go
Outdated
| commentRegex := regexp.MustCompile(`(?m)^[\t ]*#.*$`) | ||
| tmplBytes := commentRegex.ReplaceAll(input, []byte{}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
auch hier, siehe golib.JsonBytes (html false oder so setzen)
… after using linter; see #78185
json.Numbersee #78185