code: function(s, safe) {
              if (typeof s === 'string' && s.length && s.match(/^[\{\[].*[\}\]]$/)) {
                  if (safe) {
                      try {
                          /*jslint evil: true*/
                          s = (new Function('return ' + s))();
                          /*jslint evil: false*/
                      } catch (e) {} finally {
                          return s;
                      }
                  } else {
                      /*jslint evil: true*/
                      s = (new Function('return ' + s))();
                      /*jslint evil: false*/
                  }
              }
              return s;
          }
docs: function to parse JSON in *single* quotes. (jquery automatically parse only double quotes)
  That allows such code as: <a data-source="{'a': 'b', 'c': 'd'}">
  safe = true --> means no exception will be thrown
  for details see http://stackoverflow.com/questions/7410348/how-to-set-json-format-to-html5-data-attributes-in-the-jquery