mocks.js
function(val) {
		var trimmed = val.trim();
		if(trimmed.indexOf("'") === 0 && trimmed.lastIndexOf("'") === (trimmed.length - 1))
			return '"' + trimmed.substring(1, trimmed.length - 1) + '"';
		return val;
	}
function(val) {
		var trimmed = val.trim();
		if(trimmed.indexOf("'") === 0 && trimmed.lastIndexOf("'") === (trimmed.length - 1))
			return '"' + trimmed.substring(1, trimmed.length - 1) + '"';
		return val;
	}
function ( val ) { var trimmed = val . trim ( ) ; if ( trimmed . indexOf ( "'" ) === 0 && trimmed . lastIndexOf ( "'" ) === ( trimmed . length - 1 ) ) return '"' + trimmed . substring ( 1 , trimmed . length - 1 ) + '"' ; return val ; }
Normalises a json string to a valid deserialisable json string
Normalises a json string to a valid deserialisable json string