Upon investigation, I have seen some of the data in JDA is not UTF8 encoded which is why the PHP cannot convert the data to JSON formatted. the solution for this is to convert all data coming from JDA to UTF8, so the PHP can able to read all responses from the query.