Fixed json_print and tests