Java Code Examples for com.fasterxml.jackson.core.io.CharTypes#appendQuoted()
The following examples show how to use
com.fasterxml.jackson.core.io.CharTypes#appendQuoted() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JsonStreamContext.java From lams with GNU General Public License v2.0 | 5 votes |
/** * Overridden to provide developer readable "JsonPath" representation * of the context. * * @since 2.9 */ @Override public String toString() { StringBuilder sb = new StringBuilder(64); switch (_type) { case TYPE_ROOT: sb.append("/"); break; case TYPE_ARRAY: sb.append('['); sb.append(getCurrentIndex()); sb.append(']'); break; case TYPE_OBJECT: default: sb.append('{'); String currentName = getCurrentName(); if (currentName != null) { sb.append('"'); CharTypes.appendQuoted(sb, currentName); sb.append('"'); } else { sb.append('?'); } sb.append('}'); break; } return sb.toString(); }
Example 2
Source File: JsonReadContext.java From openbd-core with GNU General Public License v3.0 | 5 votes |
/** * Overridden to provide developer readable "JsonPath" representation * of the context. */ @Override public String toString() { StringBuilder sb = new StringBuilder(64); switch (_type) { case TYPE_ROOT: sb.append("/"); break; case TYPE_ARRAY: sb.append('['); sb.append(getCurrentIndex()); sb.append(']'); break; case TYPE_OBJECT: sb.append('{'); if (_currentName != null) { sb.append('"'); CharTypes.appendQuoted(sb, _currentName); sb.append('"'); } else { sb.append('?'); } sb.append('}'); break; } return sb.toString(); }
Example 3
Source File: TextNode.java From lams with GNU General Public License v2.0 | 4 votes |
protected static void appendQuoted(StringBuilder sb, String content) { sb.append('"'); CharTypes.appendQuoted(sb, content); sb.append('"'); }