I'd like to export JSON file like sample.json by ruby. (I'll upload the json.file to S3)
I expect the following way, however it needs to prepare json file before. Are there any way to export json file on ruby?
File.open("sample.json", "w") do |f|
f.write(sample_data.to_json)
end
sample.json
{
"asset_ids": [
"this is id",
],
"contract_url": "http://hoge.com/",
"name_short": "Hoge",
"name": "HogeHoge",
"issuer": "Fuga",
"description": "",
"description_mime": "text/x-markdown; charset=UTF-8",
"type": "Currency",
"divisibility": 1,
"link_to_website": false,
"version": "1.0"
}