# Statically Parse CSV to Hash

**URL:** <https://forum.crystal-lang.org/t/statically-parse-csv-to-hash/882>\
**Category:** Community\
**Created:** [June 24, 2019, 4:08pm UTC](https://forum.crystal-lang.org/t/statically-parse-csv-to-hash/882 "2019-06-24T16:08:31Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![girng](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/girng/32/127_2.png) [@girng](https://forum.crystal-lang.org/u/girng)\
**Post date:** [June 24, 2019, 5:12pm UTC](https://forum.crystal-lang.org/t/statically-parse-csv-to-hash/882/2 "2019-06-24T17:12:36Z")

</div>

With the help of gitter and @RespiteSage, @watzon, @kai (thank you!), here is what I have so far:

[https://play.crystal-lang.org/#/r/74e6](https://play.crystal-lang.org/#/r/74e6)

Problem is, we will need to invoke `to_i` every time we access `["min_value"]`. Is there a way to make it permanently an `Int32`?

Basically, we were thinking of a `from_json` like method, but for `CSV` (from\_csv). That would be amazeballs.

---

_[View the full topic](https://forum.crystal-lang.org/t/statically-parse-csv-to-hash/882)._
