uros-b commented on PR #58024: URL: https://github.com/apache/spark/pull/58024#issuecomment-5492952720
Also, ANSI-invalid JSON is accepted. IsJson delegates to JsonTypeof, whose [shared parser](https://github.com/apache/spark/blob/db76f06661a30aa0f42e8767fe775638d4692213/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/json/JsonExpressionEvalUtils.scala#L109-L114) enables single quotes and unescaped control characters for Hive compatibility. ``` SELECT '{''a'':1}' IS JSON; ``` This returns true, although the [JIRA specification](https://issues.apache.org/jira/browse/SPARK-58793) requires well-formed ANSI JSON. The predicate needs strict parsing. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
