This project has moved. For the latest updates, please go here.
1

Closed

Add new objectType to SPXmlToJson for text columns containing JSON

description

Sometimes we may store JSON as text in a list column. Maybe something like this in a column called PerformanceMetrics:
    {
        "competency": "Auto Painting",
        "subCompetency": "Dent Repair",
        "last12Months": {22, 305, 10, 305, 123, 895, 234, 684, 203, 102, 302, 292}
    }
To enable better conversion of the text value to JSON in applications, add a new mapping option using objectType: "JSON". By using $.parseJSON, we can convert from the text representation to JavaScript objects.

The conversion function looks like this:
    function jsonToJsonObject(s) {
        if (s.length === 0) {
            return null;
        } else {
            return $.parseJSON(s);
        }
    }
Closed Aug 12, 2014 at 3:42 PM by sympmarc
Fixed/added/closed in 2014.01

comments

sympmarc wrote Jan 25, 2014 at 9:53 PM

Implemented in 2014.01ALPHA1