goext/gojson/README.md

15 lines
570 B
Markdown
Raw Normal View History

2023-04-20 14:34:57 +02:00
JSON serializer which serializes nil-Arrays as `[]` and nil-maps als `{}`.
Idea from: https://github.com/homelight/json
2025-01-10 14:01:13 +01:00
Forked from https://github.com/golang/go/tree/194de8fbfaf4c3ed54e1a3c1b14fc67a830b8d95/src/encoding/json ( tag go1.23.4 )
-> https://github.com/golang/go/tree/go1.23.4/src/encoding/json
2023-04-20 14:34:57 +02:00
2023-04-20 14:35:55 +02:00
Added:
- `MarshalSafeCollections()` method
2025-01-10 14:01:13 +01:00
- `Encoder.nilSafeSlices` and `Encoder.nilSafeMaps` fields
- `Add 'tagkey' to use different key than json (set on Decoder struct)`
- `Add 'jsonfilter' to filter printed fields (set via MarshalSafeCollections)`