typicode / json-server

Get a full fake REST API with zero coding in less than 30 seconds (seriously)
Other
72.66k stars 7.01k forks source link

Support custom data format transforms #631

Open mk-pmb opened 7 years ago

mk-pmb commented 7 years ago

Hi, nice idea the json-server! Could you add support for adapters for other data formats? There's already a request for YAML in #546, I prefer CESON, TOML would be nice as well, and there are probably lots more data formats that people would like to store their data in. I guess the implementation should be in lowdb similar to the adapters, and json-server just needs to pass a user-chosen module name down to lowdb. The format adapter should get the storage filename or URL so it can guess the format from filename extension, and read additional files (e.g. indexes) if the format requires it.

nikitalpopov commented 2 years ago

+1 for JSONC