Last active
November 23, 2020 07:14
-
-
Save r7kamura/bbfbb8b345383d10aadd039c7846f4c0 to your computer and use it in GitHub Desktop.
Ruby script to convert JSON to XML.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'bundler/inline' | |
gemfile do | |
source 'https://rubygems.org' | |
gem 'activesupport' | |
gem 'builder' | |
end | |
require 'active_support/core_ext/array/conversions' | |
require 'active_support/core_ext/hash/conversions' | |
require 'json' | |
puts( | |
JSON.parse( | |
STDIN.read | |
).to_xml(dasherize: false) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment