toJSON

The toJSON() method of the VideoColorSpace interface is a serializer that returns a JSON representation of the VideoColorSpace object.

MDN Reference