mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-26 22:19:40 -08:00
Merge "Do not indent API JSON responses."
This commit is contained in:
commit
b3a78d2202
|
@ -125,7 +125,7 @@ func ErrorToJSON(err error) string {
|
|||
Value: err.Error(),
|
||||
}
|
||||
|
||||
errorJSON, err := json.MarshalIndent(errorStruct, "", "\t")
|
||||
errorJSON, err := json.Marshal(errorStruct)
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
|
@ -142,7 +142,7 @@ func TypedValueToJSON(data interface{}, typeStr string) string {
|
|||
Type: typeStr,
|
||||
Value: data,
|
||||
}
|
||||
dataJSON, err := json.MarshalIndent(dataStruct, "", "\t")
|
||||
dataJSON, err := json.Marshal(dataStruct)
|
||||
if err != nil {
|
||||
return ErrorToJSON(err)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue