// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Migrate a version-one color field // Not compiled or tested in-world // Setup: Edit DOCUMENT and the example settings, then touch as owner. Requires simulator support for LSL JSON functions. // Stop / restore: Remove or disable. JSON changes occur only in a local preview string. // Notes: Only migrates the declared version and refuses an existing destination field. Retains unrelated fields; it does not persist or apply the configuration. // License: see LICENSE in this distribution. // Original Incoprea example. MIT. string DOCUMENT="{\"version\":1,\"colour\":\"green\",\"title\":\"Lamp\"}"; string quoteJson(string value) { string result="\""; string hex="0123456789abcdef"; integer i; for(i=0;i