[jOOQ/jOOQ#12249] Support parsing Oracle 21c's JSON construction

convenience syntax
This commit is contained in:
Lukas Eder 2021-09-07 16:00:20 +02:00
parent 83dbea3107
commit 6269bf562d

View File

@ -8500,7 +8500,7 @@ final class DefaultParseContext extends AbstractScope implements ParseContext {
return jsonObject();
List<JSONEntry<?>> entries = parseList(',', ctx -> {
String key = parseJSONIdentifier();
Field key = parseField();
parse(':');
return key(key).value(parseField());
});
@ -8523,30 +8523,6 @@ final class DefaultParseContext extends AbstractScope implements ParseContext {
return null;
}
private final String parseJSONIdentifier() {
parse('"');
StringBuilder sb = new StringBuilder();
loop:
while (hasMore()) {
switch (character()) {
case '\\':
if (hasMore(1))
positionInc();
break;
case '"':
break loop;
}
sb.append(character());
positionInc();
}
parse('"');
return sb.toString();
}
private final Field<?> parseFieldJSONArrayConstructorIf() {
boolean jsonb = false;