Add collection representation

This allows creating JSON from a collection of objects.