pyspark.sql.VariantVal.toJson#
- VariantVal.toJson(zone_id='UTC')[source]#
Convert the VariantVal to a JSON string. The zone ID represents the time zone that the timestamp should be printed in. It is defaulted to UTC. The list of valid zone IDs can be found by importing the zoneinfo module and running
zoneinfo.available_timezones()
.- Returns
- str
A JSON string that represents the Variant.