Skip to content
Permalink
Browse files
add Strict Mode readme
  • Loading branch information
wongoo committed Jan 18, 2022
1 parent 643d8c4 commit 150fbb36428e56f97418df6293b33b09a27b7f9b
Showing 1 changed file with 14 additions and 0 deletions.
@@ -368,6 +368,20 @@ type Dog struct {
}
```

## Strict Mode

Default, hessian2 will decode an object to map if it's not being registered.
If you don't want that, change the decoder to strict mode as following,
and it will return error when meeting unregistered object.

```go
e := hessian.NewDecoder(bytes)
e.Strict = true // set to strict mode, default is false
// or
e := hessian.NewStrictDecoder(bytes)
```

## Tools

### tools/gen-go-enum

0 comments on commit 150fbb3

Please sign in to comment.