v0.0.349
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 1m51s

This commit is contained in:
2023-12-28 01:36:21 +01:00
parent 3188b951fb
commit 05580c384a
4 changed files with 183 additions and 7 deletions

View File

@@ -57,6 +57,19 @@ func (ee *ExErr) toJson(depth int, applyExtendListener bool, outputMeta bool) la
return ginJson
}
func (ee *ExErr) ToDefaultAPIJson() (string, error) {
gjr := json.GoJsonRender{Data: ee.ToAPIJson(true, pkgconfig.ExtendedGinOutput, pkgconfig.IncludeMetaInGinOutput), NilSafeSlices: true, NilSafeMaps: true}
r, err := gjr.RenderString()
if err != nil {
return "", err
}
return r, nil
}
// ToAPIJson converts the ExError to a json object
// (the same object as used in the Output(gin) method)
//