Skip to content

Instantly share code, notes, and snippets.

@rjhornsby
Created June 16, 2015 19:51
Show Gist options
  • Save rjhornsby/968552f86174650d3874 to your computer and use it in GitHub Desktop.
Save rjhornsby/968552f86174650d3874 to your computer and use it in GitHub Desktop.
Song serialization test script
#!/usr/bin/ruby
require 'pp'
require 'json'
require_relative 'plugins/song'
song1 = Song.new
song1.title = 'New Title'
song1.artist = 'Artist 1'
json = JSON.generate song1
puts json
puts '-------'
objs = JSON.parse json, :create_additions => true
puts objs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment