mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-17 21:15:26 +00:00
15 lines
333 B
Go
15 lines
333 B
Go
|
|
package output
|
||
|
|
|
||
|
|
import jsoniter "github.com/json-iterator/go"
|
||
|
|
|
||
|
|
var jsoniterCfg jsoniter.API
|
||
|
|
|
||
|
|
func init() {
|
||
|
|
jsoniterCfg = jsoniter.Config{SortMapKeys: true}.Froze()
|
||
|
|
}
|
||
|
|
|
||
|
|
// formatJSON formats the output for json based formatting
|
||
|
|
func (w *StandardWriter) formatJSON(output Event) ([]byte, error) {
|
||
|
|
return jsoniterCfg.Marshal(output)
|
||
|
|
}
|