bnekolny / colon_rocket

colon rocket gem to puts Ruby hash as valid json

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

colon_rocket

puts a Ruby Hash to your shell as a valid JSON object (without hash rockets)

note: always returns nil


require colon_rocket
ColonRocket.blastoff(hash, allow_overwrite)

Example

Conflicting Keys

  • default raises overlapping keys exception
  ColonRocket::OverlappingKeysException
  (Collision detected, identical key found as String and Symbol, example { a: "B", "a" => "NOT B" } 

About

colon rocket gem to puts Ruby hash as valid json

License:MIT License


Languages

Language:Ruby 100.0%