1
0
mirror of https://github.com/json-iterator/go.git synced 2025-12-02 22:48:20 +02:00
Files
json-iterator/jsoniter_struct_encoder_test.go
Oleg Shaldybin 1f58120d43 Always skip unexported fields when encoding
Skip creating encoders for unexported fields. They are not participating
in JSON marshaling anyway. This allows using unexported fields of
non-marshalable types in structs.

As a side-effect of this change it's no longer possible to marshal
unexported JSON fields by adding a custom type extenstion. It seems this
is desired behavior since it matches standard library and jsoniter
already disallows `json:"-"` fields from participating in custom
extensions.

Fixes #174.
2017-09-18 11:02:15 -07:00

1.0 KiB