Added JSON serialization and tests to project