Json Encoding working correctly now.