refactored json parsing to use json_encode instead of manual creation
Merge branch 'Dev' of https://github.com/thedarkjester/CPD7046 into Dev