com.fasterxml.jackson.core.JsonPointer._appendEscape()方法的使用及代码示例

x33g5p2x  于2022-01-22 转载在 其他  
字(4.7k)|赞(0)|评价(0)|浏览(95)

本文整理了Java中com.fasterxml.jackson.core.JsonPointer._appendEscape()方法的一些代码示例,展示了JsonPointer._appendEscape()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JsonPointer._appendEscape()方法的具体详情如下:
包路径:com.fasterxml.jackson.core.JsonPointer
类名称:JsonPointer
方法名:_appendEscape

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);
}

相关文章