mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 05:40:11 +01:00
Fix: Allow unknown fields: They are not forbidden
This commit is contained in:
parent
c81f55a752
commit
7935818600
1 changed files with 0 additions and 2 deletions
|
|
@ -18,8 +18,6 @@ import (
|
|||
// while not allowing unknown fields nor trailing data
|
||||
func StrictJSONParse(jsonData io.Reader, target any) error {
|
||||
decoder := json.NewDecoder(jsonData)
|
||||
// Don't allow unknown fields
|
||||
decoder.DisallowUnknownFields()
|
||||
|
||||
if err := decoder.Decode(target); err != nil {
|
||||
return fmt.Errorf("JSON decoding error: %w", err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue