crystal-json-key-mapper
A hack to make JSON.mapping
by default map crystal underscore names to JSON camelcase names.
Not recommended!
Limitation
All field names in crystal classes should not have uppercase letters. (Only lowercase letters and underscores.)
Installation
Add this to your application's shard.yml
:
dependencies:
crystal-json-key-mapper:
github: liuyang1204/crystal-json-key-mapper
branch: master
Usage
require this at the very beginning of the application.
require "json"
require "crystal-json-key-mapper"
Contributors
- liuyang1204 Leon Liu - creator, maintainer