Added json error handling for invalid UTF character