file-system-cache icon indicating copy to clipboard operation
file-system-cache copied to clipboard

Support other datatypes such as Dates / Disallow other datatypes

Open JeremyMoeglich opened this issue 1 year ago • 1 comments

Currently datatypes such as Dates, Sets or Maps are not supported as JSON can't represent those types.

The solutions I'm thinking of are:

  1. Only allow types that can be converted losslessly to JSON, for example JsonValue in the library type-fest
  2. Don't use JSON and use an alternative, libraries such as devalue and serialize-javascript might be an option

JeremyMoeglich avatar Mar 05 '23 20:03 JeremyMoeglich

https://github.com/Rich-Harris/devalue

philcockfield avatar Aug 13 '23 21:08 philcockfield