[
https://issues.apache.org/jira/browse/TAP5-2443?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jochen Kemnade updated TAP5-2443:
---------------------------------
Attachment: tap5-json-regexp.groovy
The attached Groovy script triggers the error. We should accept the value and
turn it into a {{java.util.regex.Pattern}} or at least into a
{{org.apache.tapestry5.json.JSONLiteral}}, or report a better error.
> JSON parser cannot handle RegExp values
> ---------------------------------------
>
> Key: TAP5-2443
> URL: https://issues.apache.org/jira/browse/TAP5-2443
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-json
> Affects Versions: 5.4
> Reporter: Jochen Kemnade
> Priority: Minor
> Attachments: tap5-json-regexp.groovy
>
>
> If a JSON string contains a RegExp value, the parser fails and reports that
> the value is missing.
> {code}
> java.lang.RuntimeException: Missing value at character 8 of {regex: /foo/}
> at
> org.apache.tapestry5.json.JSONTokener.syntaxError(JSONTokener.java:384)
> at org.apache.tapestry5.json.JSONTokener.nextValue(JSONTokener.java:301)
> at org.apache.tapestry5.json.JSONObject.<init>(JSONObject.java:260)
> at org.apache.tapestry5.json.JSONObject.<init>(JSONObject.java:295)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)