Changed to support all collections
Merge pull request #2 from Reglare/master

Call json/generate-string for all kinds of collections