[fix] catch any exceptions possibly thrown by JSON.parse()
[example] added example
Merge pull request #1 from jcrugzz/json-parse

[fix] put try catch around JSON.parse()