// integrations/cisco-mpp-phone/systemJson.js // // Parser for /basic/System.json (web/proxy/network config). import { coerceRows, fieldsFromRows } from './jsonRows.js'; /** * @param {string|Array} raw * @returns {object} */ export function parseSystemJson(raw) { const rows = coerceRows(raw); const fields = fieldsFromRows(rows); return { fields, webServer: fields['Enable Web Server'] || null, proxyMode: fields['Proxy Mode'] || null, ipMode: fields['IP Mode'] || null, connectionType: fields['Connection Type'] || fields['Connection Type_IPV6'] || null, dot1xCertSelect: fields['Certificate Select'] || null, autoConfig: fields['Auto Config'] || null, }; }