crystal-pg icon indicating copy to clipboard operation
crystal-pg copied to clipboard

Add to_json method

Open ansarizafar opened this issue 8 years ago • 2 comments

Please add a to_json method to resultset/Query result object to provide automatic json conversion.

ansarizafar avatar Sep 20 '17 07:09 ansarizafar

A db can hold more values than then json format can represent. And there are not always a clear winner on how to encode it.

Meanwhile https://manas.tech/blog/2017/01/16/from-a-db-to-json-with-crystal.html might offer some alternatives to handle within the scope of the app you are working on.

bcardiff avatar Sep 20 '17 14:09 bcardiff

Please check this project https://github.com/akwiatkowski/crystal_api for Postgresql type conversion.

ansarizafar avatar Sep 20 '17 18:09 ansarizafar