When a style is validated in GL JS, functions embedded in the metadata are tolerated during validation but cause an error when the style is transferred to the worker. We should validate that metadata only contains valid JSON, no functions or complex objects.
When a style is validated in GL JS, functions embedded in the metadata are tolerated during validation but cause an error when the style is transferred to the worker. We should validate that metadata only contains valid JSON, no functions or complex objects.
ref https://github.com/mapbox/mapbox-gl-js/issues/3360#event-822052810