SitecoreAI Connector
Migrating from XP/XM Connector to SitecoreAI Connector
Legacy XML-Based Values and Backward Compatibility

Legacy XML-Based Values and Backward Compatibility

Older XP/XM implementations may store Bynder asset data as XML-wrapped JSON, for example:

<asset><![CDATA[{"type":"Assets","assets":[{"id":"A1","name":"example","files":[]}]}]]></asset>

SitecoreAI-native implementations generally store JSON object data (or JSON string data in some pipelines).

The SDK supports all common formats:

  • SitecoreAI/XM Cloud JSON object
  • JSON string
  • Legacy XP/XM XML-wrapped JSON

Use parseBynderField() so components can support mixed legacy and modern data during migration.

Legacy XML -> SitecoreAI SDK parsing example

import { parseBynderField } from '@neworange/bynder-dam-connector-sitecoreai-sdk';
 
const legacyValue = '<asset><![CDATA[{"type":"Assets","assets":[{"id":"A1","name":"Example","files":[]}]}]]></asset>';
const parsed = parseBynderField(legacyValue);
 
// parsed is normalized to the Bynder asset response shape when valid.

See Also