django_jsonforms/static/django_jsonforms/jsoneditor_init.js
// Get value from either a json string or url pointing to a json file
Get value from either a json string or url pointing to a json file
Get value from either a json string or url pointing to a json file
function process(value) {
        var isjson=true;
        var result;
        try {
          result = JSON.parse(value);
        } catch(e) {
          isjson=false;
        }
        if (isjson) {
          return result;
        } else {
          return $.getJSON(value)
            .then(function (response) {
                return response;
            });
        }
    }
function process ( value ) { var isjson = true ; var result ; try { result = JSON . parse ( value ) ; } catch ( e ) { isjson = false ; } if ( isjson ) { return result ; } else { return $ . getJSON ( value ) . then ( function ( response ) { return response ; } ) ; } }
Get value from either a json string or url pointing to a json file
Get value from either a json string or url pointing to a json file