A fork of encoding/json
from go's stdlib which contains an extra Decoder function which enforces strict field name
matching. This is currently only tested in practice not in any specific unit tests. This should be a drop in replacement
for encoding/json
.
Provide a more suitable outcome in security related json decoding for example when supporting or implementing JOSE.
- go 1.18
- use of
any
type alias
- use of
- LICENSE is UNCHANGED and completely equal to that of the original LICENSE
- All credits to the original repository
- Addition of function
UseStrictNames
toDecoder
in 5d7d407:- Adjusts the
strict
boolean field of thedecodeState
struct to betrue
for that specificDecoder
- The
strict
field determines if thefield
functionequalFold
is used when matching struct fields
- Adjusts the
- Fork of necessary internal packages:
- Includes the
internal/testenv
package asgithub.com/james-d-elliott/go-json/internal/testenv
- Includes the
internal/cfg
package asgithub.com/james-d-elliott/go-json/internal/cfg
- Includes the
- All other changes are purely documentation
Forked initially from 1.19.3 commit sha1 5d5ed57b134b7a02259ff070864f753c9e601a18.
The following table contains a list of tags for this repository and their go version equivalence.
Tag | Go Version | Go Commit |
---|---|---|
v0.1.0 | 1.19.3 | 5d5ed57b134b7a02259ff070864f753c9e601a18 |