fix API json error handling
Merge pull request #139 from pmattmann/zf2.unittest

UserFreindship, GroupMembership + CampCollaboration
Merge pull request #140 from usu/zf2.api

fix API json error handling
cs fixer