ParserOutput provides two methods to attach arbitrary data: setProperty() and setExtensionData(). We need to ensure the data passed into these methods is safe to serialize, for two reasons:
- ParserOutput should be kept small. Serializing arbitrary objects can easily drag in large amounts of data, causing issues with cache capacity.
- We want to start using JSON for serializing the ParserOutput. To achieve this, only plain data can be supported here. That is, the data must not contain objects (beyond anonymous objects).
To avoid production errors such as T264363, attempts to attach complex objects to ParserOutput should be logged as errors (or deprecation warnings?), but should not throw an exception for a while.
Found in logstash:
- $.ExtensionData.pageImages.13.frame.link-title (T266251)
- $.ExtensionData.GeoDataCoordsOutput (T266248)
- $.ExtensionData.TemplateDataStatus (T266252)
- $.ExtensionData.kartographer (T266260)
- $.ExtensionData.referenced-entities.0 (T266263)
- $.JsConfigVars.entityTitle (T267377)
- $.ExtensionData.translate-translation-page.sourcepagetitle (T266268)
Also noted in Semantic MediaWiki: issue 4868