I\'m using json-io for converting some JSON data to Java objects:
DataTransferContainer dataTransferContainer = (DataTransferContainer)JsonReader.jsonToJava(
In ICU regex patterns, bracket expression pattern cannot start with :
.
You need to change the pattern to
Pattern.compile("(\\d{2})[.:](\\d{2})[.:](\\d{2})[.](\\d{1,10})([+-]\\d{2}:?\\d{2}|Z)?")
Note the changes:
[:]
is changed to :
[:.]
is changed to [.:]
The regex library used in Android is ICU, and one of its peculiarities is that it supports POSIX character classes outside bracket expressions. That means you may write [[:digit:]]
to match a digit, or [:digit:]
(which is invalid in most other regex flavors including POSIX). The ICU regex parser seems to have problems parsing bracket expressions starting with :
and surely it is a bug.