copying isJSON() from gist.github.com/tracend/5975713
copying camelCase from gist.github.com/tracend/5530356
copying toDash from gist.github.com/tracend/5419653