adjusted json_encode call to the new export format.