Add sample json; add error handling for passed-in json