refactored GeneratingJSON#generateJson() and checked for privileges
transferred some methods for generatingJson to the service layer
handled
Merge pull request #22 from k-joseph/CSM-5

[#CSM-5 User privileges check]