Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@rjhornsby
Created June 16, 2015 19:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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