Assisted-by: GLM 5.3 Flash
This commit is contained in:
@@ -52,6 +52,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
order on decode and sorts on encode. It works as a decode target on its
|
||||
own, in a struct field, and as the element of an array of tables; its
|
||||
values are untyped, so a nested table stays a `map[string]any`.
|
||||
- `UnmarshalWithOptions(data, v, opts)` decodes with a `DecodeOptions` struct
|
||||
in one call, the options a `Decoder` sets without building one: unknown
|
||||
keys, `Number` literals, and the parse limits.
|
||||
- `Marshal` carries a nesting limit of 10000 levels, the parser's own figure:
|
||||
cyclic data, which used to run the stack out, is now rejected with an error
|
||||
that names the limit and the path it was met at.
|
||||
- The `toml` tag gained the `required` option: a field tagged
|
||||
`toml:"host,required"` makes the decode fail with
|
||||
`missing required key "host"` when the document carries no key that
|
||||
|
||||
Reference in New Issue
Block a user