protection against malformed json