restpack_serializer demo

restpack_serializer provides model serialization, paging, side-loading and filtering. It will implement the emerging specification.

These examples model Artists --> Albums --> Songs

Here are all artists:


here are just two:


and here is a single artist resource:


Let's side-load their albums:


Now we'll side-load albums and songs:


Notice that as there may be a large number of songs (there are 31 in this case), we're only returning the first page here. The meta.songs.next_href property links to the next page of song data:


and if we want to include side-loads:


Let's grab two songs by ID


And include related data:


We can also filter by foreign key: