本文整理了Java中com.fasterxml.jackson.core.JsonPointer._appendEscape()
方法的一些代码示例,展示了JsonPointer._appendEscape()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JsonPointer._appendEscape()
方法的具体详情如下:
包路径:com.fasterxml.jackson.core.JsonPointer
类名称:JsonPointer
方法名:_appendEscape
暂无
代码示例来源:origin: redisson/redisson
/**
* Method called to parse tail of pointer path, when a potentially
* escaped character has been seen.
*
* @param input Full input for the tail being parsed
* @param i Offset to character after tilde
*/
protected static JsonPointer _parseQuotedTail(String input, int i) {
final int end = input.length();
StringBuilder sb = new StringBuilder(Math.max(16, end));
if (i > 2) {
sb.append(input, 1, i-1);
}
_appendEscape(sb, input.charAt(i++));
while (i < end) {
char c = input.charAt(i);
if (c == '/') { // end is nigh!
return new JsonPointer(input, sb.toString(),
_parseTail(input.substring(i)));
}
++i;
if (c == '~' && i < end) {
_appendEscape(sb, input.charAt(i++));
continue;
}
sb.append(c);
}
// end of the road, last segment
return new JsonPointer(input, sb.toString(), EMPTY);
}
代码示例来源:origin: FasterXML/jackson-core
/**
* Method called to parse tail of pointer path, when a potentially
* escaped character has been seen.
*
* @param input Full input for the tail being parsed
* @param i Offset to character after tilde
*/
protected static JsonPointer _parseQuotedTail(String input, int i) {
final int end = input.length();
StringBuilder sb = new StringBuilder(Math.max(16, end));
if (i > 2) {
sb.append(input, 1, i-1);
}
_appendEscape(sb, input.charAt(i++));
while (i < end) {
char c = input.charAt(i);
if (c == '/') { // end is nigh!
return new JsonPointer(input, sb.toString(),
_parseTail(input.substring(i)));
}
++i;
if (c == '~' && i < end) {
_appendEscape(sb, input.charAt(i++));
continue;
}
sb.append(c);
}
// end of the road, last segment
return new JsonPointer(input, sb.toString(), EMPTY);
}
代码示例来源:origin: Nextdoor/bender
/**
* Method called to parse tail of pointer path, when a potentially
* escaped character has been seen.
*
* @param input Full input for the tail being parsed
* @param i Offset to character after tilde
*/
protected static JsonPointer _parseQuotedTail(String input, int i) {
final int end = input.length();
StringBuilder sb = new StringBuilder(Math.max(16, end));
if (i > 2) {
sb.append(input, 1, i-1);
}
_appendEscape(sb, input.charAt(i++));
while (i < end) {
char c = input.charAt(i);
if (c == '/') { // end is nigh!
return new JsonPointer(input, sb.toString(),
_parseTail(input.substring(i)));
}
++i;
if (c == '~' && i < end) {
_appendEscape(sb, input.charAt(i++));
continue;
}
sb.append(c);
}
// end of the road, last segment
return new JsonPointer(input, sb.toString(), EMPTY);
}
代码示例来源:origin: com.eclipsesource.jaxrs/jersey-all
/**
* Method called to parse tail of pointer path, when a potentially
* escaped character has been seen.
*
* @param input Full input for the tail being parsed
* @param i Offset to character after tilde
*/
protected static JsonPointer _parseQuotedTail(String input, int i) {
final int end = input.length();
StringBuilder sb = new StringBuilder(Math.max(16, end));
if (i > 2) {
sb.append(input, 1, i-1);
}
_appendEscape(sb, input.charAt(i++));
while (i < end) {
char c = input.charAt(i);
if (c == '/') { // end is nigh!
return new JsonPointer(input, sb.toString(),
_parseTail(input.substring(i)));
}
++i;
if (c == '~' && i < end) {
_appendEscape(sb, input.charAt(i++));
continue;
}
sb.append(c);
}
// end of the road, last segment
return new JsonPointer(input, sb.toString(), EMPTY);
}
代码示例来源:origin: org.kill-bill.billing/killbill-platform-osgi-bundles-logger
/**
* Method called to parse tail of pointer path, when a potentially
* escaped character has been seen.
*
* @param input Full input for the tail being parsed
* @param i Offset to character after tilde
*/
protected static JsonPointer _parseQuotedTail(String input, int i) {
final int end = input.length();
StringBuilder sb = new StringBuilder(Math.max(16, end));
if (i > 2) {
sb.append(input, 1, i-1);
}
_appendEscape(sb, input.charAt(i++));
while (i < end) {
char c = input.charAt(i);
if (c == '/') { // end is nigh!
return new JsonPointer(input, sb.toString(),
_parseTail(input.substring(i)));
}
++i;
if (c == '~' && i < end) {
_appendEscape(sb, input.charAt(i++));
continue;
}
sb.append(c);
}
// end of the road, last segment
return new JsonPointer(input, sb.toString(), EMPTY);
}
代码示例来源:origin: hstaudacher/osgi-jax-rs-connector
/**
* Method called to parse tail of pointer path, when a potentially
* escaped character has been seen.
*
* @param input Full input for the tail being parsed
* @param i Offset to character after tilde
*/
protected static JsonPointer _parseQuotedTail(String input, int i) {
final int end = input.length();
StringBuilder sb = new StringBuilder(Math.max(16, end));
if (i > 2) {
sb.append(input, 1, i-1);
}
_appendEscape(sb, input.charAt(i++));
while (i < end) {
char c = input.charAt(i);
if (c == '/') { // end is nigh!
return new JsonPointer(input, sb.toString(),
_parseTail(input.substring(i)));
}
++i;
if (c == '~' && i < end) {
_appendEscape(sb, input.charAt(i++));
continue;
}
sb.append(c);
}
// end of the road, last segment
return new JsonPointer(input, sb.toString(), EMPTY);
}
内容来源于网络,如有侵权,请联系作者删除!