com.redhat.lightblue.util.JsonUtils.indent()方法的使用及代码示例

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

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

JsonUtils.indent介绍

暂无

代码示例

代码示例来源:origin: com.redhat.lightblue/util

private static boolean valueToString(StringBuilder bld,
                   JsonNode node,
                   int depth,
                   boolean newLine) {
  if (newLine) {
    indent(bld, depth);
    newLine = false;
  }
  bld.append(node.toString());
  return newLine;
}

代码示例来源:origin: lightblue-platform/lightblue-core

private static boolean valueToString(StringBuilder bld,
                   JsonNode node,
                   int depth,
                   boolean newLine) {
  if (newLine) {
    indent(bld, depth);
    newLine = false;
  }
  bld.append(node.toString());
  return newLine;
}

代码示例来源:origin: com.redhat.lightblue/lightblue-core-util

private static boolean valueToString(StringBuilder bld,
                   JsonNode node,
                   int depth,
                   boolean newLine) {
  if (newLine) {
    indent(bld, depth);
    newLine = false;
  }
  bld.append(node.toString());
  return newLine;
}

代码示例来源:origin: com.redhat.lightblue/lightblue-core-util

private static boolean arrayToString(StringBuilder bld,
                   ArrayNode node,
                   int depth,
                   boolean newLine) {
  if (newLine) {
    indent(bld, depth);
    newLine = false;
  }
  bld.append("[");
  boolean first = true;
  for (Iterator<JsonNode> itr = node.elements();
      itr.hasNext();) {
    if (first) {
      first = false;
    } else {
      bld.append(',');
    }
    newLine = toString(bld, itr.next(), depth + 1, newLine);
  }
  if (newLine) {
    indent(bld, depth);
  }
  bld.append(']');
  return false;
}

代码示例来源:origin: com.redhat.lightblue/util

private static boolean arrayToString(StringBuilder bld,
                   ArrayNode node,
                   int depth,
                   boolean newLine) {
  if (newLine) {
    indent(bld, depth);
    newLine = false;
  }
  bld.append("[");
  boolean first = true;
  for (Iterator<JsonNode> itr = node.elements();
      itr.hasNext();) {
    if (first) {
      first = false;
    } else {
      bld.append(',');
    }
    newLine = toString(bld, itr.next(), depth + 1, newLine);
  }
  if (newLine) {
    indent(bld, depth);
  }
  bld.append(']');
  return false;
}

代码示例来源:origin: lightblue-platform/lightblue-core

private static boolean arrayToString(StringBuilder bld,
                   ArrayNode node,
                   int depth,
                   boolean newLine) {
  if (newLine) {
    indent(bld, depth);
    newLine = false;
  }
  bld.append("[");
  boolean first = true;
  for (Iterator<JsonNode> itr = node.elements();
      itr.hasNext();) {
    if (first) {
      first = false;
    } else {
      bld.append(',');
    }
    newLine = toString(bld, itr.next(), depth + 1, newLine);
  }
  if (newLine) {
    indent(bld, depth);
  }
  bld.append(']');
  return false;
}

代码示例来源:origin: lightblue-platform/lightblue-core

boolean newLine) {
if (newLine) {
  indent(bld, depth);
  newLine = false;
  } else {
    if (newLine) {
      indent(bld, depth);
  indent(bld, depth);
  bld.append('\"');
  bld.append(entry.getKey());
  newLine = toString(bld, entry.getValue(), depth + 1, false);
  if (newLine) {
    indent(bld, depth);
    newLine = false;
  indent(bld, depth);

代码示例来源:origin: com.redhat.lightblue/lightblue-core-util

boolean newLine) {
if (newLine) {
  indent(bld, depth);
  newLine = false;
  } else {
    if (newLine) {
      indent(bld, depth);
  indent(bld, depth);
  bld.append('\"');
  bld.append(entry.getKey());
  newLine = toString(bld, entry.getValue(), depth + 1, false);
  if (newLine) {
    indent(bld, depth);
    newLine = false;
  indent(bld, depth);

代码示例来源:origin: com.redhat.lightblue/util

boolean newLine) {
if (newLine) {
  indent(bld, depth);
  newLine = false;
  } else {
    if (newLine) {
      indent(bld, depth);
  indent(bld, depth);
  bld.append('\"');
  bld.append(entry.getKey());
  newLine = toString(bld, entry.getValue(), depth + 1, false);
  if (newLine) {
    indent(bld, depth);
    newLine = false;
  indent(bld, depth);

相关文章