Skip to content

Add as_json, to_json, and Playlist.from_h#64

Merged
sethdeckard merged 1 commit into
masterfrom
add-playlist-from-h
May 23, 2026
Merged

Add as_json, to_json, and Playlist.from_h#64
sethdeckard merged 1 commit into
masterfrom
add-playlist-from-h

Conversation

@sethdeckard

Copy link
Copy Markdown
Owner

Add as_json and to_json to the Serializable mixin and include it in Playlist, so playlists and items render to JSON. Add Playlist.from_h to rebuild a playlist from a Hash or parsed JSON, dispatching on each item's :item_type.

Defining to_json/as_json overrides the generic versions the json library and ActiveSupport provide for these objects.

Document the serialization API in the README and cover the Hash and JSON round-trip for every fixture.

Add as_json and to_json to the Serializable mixin and include
it in Playlist, so playlists and items render to JSON. Add
Playlist.from_h to rebuild a playlist from a Hash or parsed
JSON, dispatching on each item's :item_type.

Defining to_json/as_json overrides the generic versions the
json library and ActiveSupport provide for these objects.

Document the serialization API in the README and cover the
Hash and JSON round-trip for every fixture.
@sethdeckard
sethdeckard merged commit 27c163e into master May 23, 2026
4 checks passed
@sethdeckard
sethdeckard deleted the add-playlist-from-h branch May 23, 2026 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant