Fixed a test problem for bug #8026.
This fixes #8028. The output is now json_encoded.
One more small fix for bug #8028.