called when json-smart done parsing a value
193550
public void setValue(Object current, String key, Object value) throws ParseException, IOException {
		// if (obj != null)
		mapper.setValue(current, key, value);
	}
126574
function setJsonField(json, field, value) {
    if (value === undefined && typeof value === 'undefined') {
        //Ignore undefined values
        return;
    }
    if (value === null) {
        //Ignore null values
        return;
    }
    if (typeof value === 'boolean' && value === false) {
        //Ignore false values since they are generally default values.
        return;
    }
    json[field] = value;
}
634996
function setUpdateStateInJSON(key, value) {
         var result = $.Deferred();

        updateJsonHandler.set(key, value)
            .done(function () {
                result.resolve();
            })
            .fail(function () {
                resetStateInFailure("AutoUpdate : Could not modify updatehelper.json");
                result.reject();
            });
        return result.promise();
    }
1200872
private static String getJsonValueAsString(JsonValue value) {
        return (value != null && value.getValueType() == ValueType.STRING) ? ((JsonString) value).getString() : null;
    }
262837
function(key)
        {
            // get value
            var val = this.getItem(key);

            // if null, return null
            if (val === null) {
                return null;
            }

            // parse and return value
            return JSON.parse(val);
        }
432789
function _jsonLoaded(callback, err, data) {
  if (err) return callback(err);
  var parsed;
  try {
    parsed = JSON.parse(data);
  } catch(jerr) {
    return callback(jerr);
  }
  callback(null, parsed);
}
235234
def value_from_object(self, obj):
        """"""
        val = super(JSONField, self).value_from_object(obj)
        return self.get_prep_value(val)
107709
private static String getJsonValueAsNumberString(JsonValue value) {
        return (value != null && value.getValueType() == ValueType.NUMBER) ? value.toString() : null;
    }
382762
function(field, value) {
        if (field in this) {
            if (this.get(field) !== value && !([
                null,
                undefined
            ].indexOf(this.get(field)) > -1 && [
                null,
                undefined
            ].indexOf(value) > -1)) {
                if (CRUD.EntityManager.entities[this.getType()].autoSerialize.indexOf(field) > -1) {
                    if (JSON.stringify(this.get(field)) != JSON.stringify(value)) {
                        this.__dirtyValues__[field] = value;
                    }
                } else {
                    this.__dirtyValues__[field] = value;
                }
            }
        } else {
            CRUD.log('Could not find field \'' + field + '\' in \'' + this.getType() + '\' (for set)');
        }
    }
963162
function parsePreferencesJson(value, key) {
        var answer = null;
        if (angular.isDefined(value)) {
            answer = Core.parseJsonText(value, "localStorage for " + key);
        }
        return answer;
    }
770122
private Object getJSONValue(Object value) throws JSONException {
    if (value instanceof Bundle) {
      return getJSONForBundle((Bundle) value);
    } else if (value instanceof CharSequence) {
      return value.toString();
    } else if (value instanceof List) {
      JSONArray array = new JSONArray();
      for (Object listValue : (List<?>) value) {
        array.put(getJSONValue(listValue));
      }
      return array;
    } else if (value instanceof SparseArray) {
      JSONArray array = new JSONArray();
      SparseArray<?> sparseValue = (SparseArray<?>) value;
      for (int i = 0; i < sparseValue.size(); i++) {
        array.put(sparseValue.keyAt(i), getJSONValue(sparseValue.valueAt(i)));
      }
      return array;
    } else if (value instanceof Character) {
      return value.toString();
    } else if (value instanceof Boolean) {
      return value;
    } else if (value instanceof Number) {
      if (value instanceof Double || value instanceof Float) {
        return ((Number) value).doubleValue();
      } else {
        return ((Number) value).longValue();
      }
    } else if (value instanceof boolean[]) {
      JSONArray array = new JSONArray();
      for (boolean arrValue : (boolean[]) value) {
        array.put(getJSONValue(arrValue));
      }
      return array;
    } else if (value instanceof char[]) {
      JSONArray array = new JSONArray();
      for (char arrValue : (char[]) value) {
        array.put(getJSONValue(arrValue));
      }
      return array;
    } else if (value instanceof CharSequence[]) {
      JSONArray array = new JSONArray();
      for (CharSequence arrValue : (CharSequence[]) value) {
        array.put(getJSONValue(arrValue));
      }
      return array;
    } else if (value instanceof double[]) {
      JSONArray array = new JSONArray();
      for (double arrValue : (double[]) value) {
        array.put(getJSONValue(arrValue));
      }
      return array;
    } else if (value instanceof float[]) {
      JSONArray array = new JSONArray();
      for (float arrValue : (float[]) value) {
        array.put(getJSONValue(arrValue));
      }
      return array;
    } else if (value instanceof int[]) {
      JSONArray array = new JSONArray();
      for (int arrValue : (int[]) value) {
        array.put(getJSONValue(arrValue));
      }
      return array;
    } else if (value instanceof long[]) {
      JSONArray array = new JSONArray();
      for (long arrValue : (long[]) value) {
        array.put(getJSONValue(arrValue));
      }
      return array;
    } else if (value instanceof short[]) {
      JSONArray array = new JSONArray();
      for (short arrValue : (short[]) value) {
        array.put(getJSONValue(arrValue));
      }
      return array;
    } else if (value instanceof String[]) {
      JSONArray array = new JSONArray();
      for (String arrValue : (String[]) value) {
        array.put(getJSONValue(arrValue));
      }
      return array;
    }
    return null;
  }
1140505
protected void onInt(Integer val, String fieldName, JsonParser jp) {
		log.trace(fieldName + " " + val);
	}
813064
function (res) {
      var value;
      try {
        value = JSON.parse(res);
        if (typeof value === 'undefined') {
          value = res;
        }
        if (value === 'true') {
          value = true;
        } else if (value === 'false') {
          value = false;
        } else if (parseFloat(value) === value && !angular.isObject(value)) {
          value = parseFloat(value);
        }
      } catch (e) {
        value = res;
      }
      return value;
    }
1297035
def from_json(value, **kwargs):
        """"""
        if isinstance(value, string_types):
            value = value.upper()
            if value in ('TRUE', 'Y', 'YES', 'ON'):
                return True
            if value in ('FALSE', 'N', 'NO', 'OFF'):
                return False
        if isinstance(value, int):
            return value
        raise ValueError('Could not load boolean from JSON: {}'.format(value))
160385
function decode ( value ) {
	let resolvedValue = {};
	try {
		resolvedValue = JSON.parse(value.getValue());
	} catch ( e ) {
		resolvedValue = null;
	}
	return setJsonValueToSassValue(resolvedValue);
}
139888
def decode_json_if_json(value)
      is_json = (value.start_with?('{') && value.end_with?('}')) ||
        (value.start_with?('[') && value.end_with?(']'))
      return value unless is_json
      ActiveSupport::JSON.decode(value)
    rescue
      value
    end
276370
private void parseEvent(JsonObject event, Parser parser, int i) {

        JsonElement nameJE = event.get(Event.KEY_NAME);

        if (nameJE != null) {

            String name = nameJE.getAsString();

            if (MessageSentEvent.TYPE.equals(name)) {
                MessageSentEvent parsed = parser.parse(event, MessageSentEvent.class);
                messageSent.add(parsed);
                map.put(i, parsed);
            } else if (MessageDeliveredEvent.TYPE.equals(name)) {
                MessageDeliveredEvent parsed = parser.parse(event, MessageDeliveredEvent.class);
                messageDelivered.add(parsed);
                map.put(i, parsed);
            } else if (MessageReadEvent.TYPE.equals(name)) {
                MessageReadEvent parsed = parser.parse(event, MessageReadEvent.class);
                messageRead.add(parsed);
                map.put(i, parsed);
            }
        }
    }