jparse
jparse copied to clipboard
Exception when field name contains underscore
I'm currently exploring various libraries to parse json string partially & lazily, and found jparse, great library with intuitive & simple API.
But during testing, i found PathParser
failed to parse when the field name contains underscore character '_'
.
For example, field.subField.extra_data
would throw this exception:
Exception in thread "main" java.lang.IllegalStateException: Unable to understand char _ index 20
at io.nats.jparse.path.PathParser.parseKeyName(PathParser.java:360)
at io.nats.jparse.path.PathParser.scan(PathParser.java:129)
at io.nats.jparse.path.PathParser.scan(PathParser.java:48)
at io.nats.jparse.path.PathParser.parse(PathParser.java:59)
at io.nats.jparse.parser.JsonParser.parse(JsonParser.java:58)
at io.nats.jparse.Path.toPath(Path.java:116)
at io.nats.jparse.Path.atPath(Path.java:60)
Do i miss something?