Skip to content

Instantly share code, notes, and snippets.

@mdub
Created August 13, 2013 03:46
Show Gist options
  • Select an option

  • Save mdub/6217732 to your computer and use it in GitHub Desktop.

Select an option

Save mdub/6217732 to your computer and use it in GitHub Desktop.

Revisions

  1. mdub created this gist Aug 13, 2013.
    10 changes: 10 additions & 0 deletions json2yaml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    #!/usr/bin/env ruby

    require 'rubygems'
    require 'json'
    require 'yaml'

    JSON.create_id = "__disabled__"

    data = JSON.parse(STDIN.read)
    YAML.dump(data, STDOUT)