marcglasberg / fast_immutable_collections

Dart Package: Immutable lists, sets, maps, and multimaps, which are as fast as their native mutable counterparts. Extension methods and comparators for native Dart collections.
BSD 2-Clause "Simplified" License
217 stars 30 forks source link

add conversion of non-string keys for maps #25

Closed TimWhiting closed 3 years ago

TimWhiting commented 3 years ago

This solves an issue where keys of maps are not converted to Strings which are the only valid json map key.

Really only primitive types or types convertible to a simple string can be keys if using json serialization. Unfortunately the current workaround is limited in what types can be supported, but hopefully the underlying issue with json_serializable can be fixed which would solve this in general.