Created
June 16, 2015 19:51
-
-
Save rjhornsby/968552f86174650d3874 to your computer and use it in GitHub Desktop.
Song serialization test script
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
#!/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