Get the text in the CDATA block.
@return The string up to the <code>]]&gt;</code>.
@throws JSONException If the <code>]]&gt;</code> is not found.
16277
public String nextCDATA() throws JSONException {
        char         c;
        int          i;
        StringBuffer sb = new StringBuffer();
        for (;;) {
            c = next();
            if (c == 0) {
                throw syntaxError("Unclosed CDATA");
            }
            sb.append(c);
            i = sb.length() - 3;
            if (i >= 0 && sb.charAt(i) == ']' &&
                          sb.charAt(i + 1) == ']' && sb.charAt(i + 2) == '>') {
                sb.setLength(i);
                return sb.toString();
            }
        }
    }
1175305
@Override
    public String getText()
    {
        if (_closed) {
            return null;
        }
        // need to separate handling a bit...
        switch (_currToken) {
        case FIELD_NAME:
            return _nodeCursor.getCurrentName();
        case VALUE_STRING:
            return (String) currentNode().unwrapped();
        case VALUE_NUMBER_INT:
        case VALUE_NUMBER_FLOAT:
            return String.valueOf(currentNode().unwrapped());
        case VALUE_EMBEDDED_OBJECT:
        	throw new UnsupportedOperationException("VALUE_EMBEDDED_OBJECT is not supported by HOCON");
        default:
        	return (_currToken == null) ? null : _currToken.asString();
        }
    }
607316
@JsonIgnore
    public String getErrorMessage(){
        StringBuilder sb = new StringBuilder();
        sb.append(exceptionCode.getCode()).append(":").append(exceptionCode.getMessage());
        if(this.message != null && ! this.message.isEmpty()){
            sb.append(" - ").append(message);
        }
        return sb.toString();
    }
686797
@Override
    public String getMessage() {
        final int maxTipLength = 10;
        int end = position + 1;
        int start = end - maxTipLength;
        if (start < 0) {
            start = 0;
        }
        if (end > jsonString.length()) {
            end = jsonString.length();
        }
        return String.format("%s (%d):%s", jsonString.substring(start, end), position, super.getMessage());
    }
785564
public String text() {
        final StringBuilder sb = new StringBuilder();
        for (Object child : this.children) {
            if (child instanceof Node) {
                sb.append(((Node) child).text());
            } else {
                sb.append(child);
            }
        }
        return sb.toString();
    }
220551
@Override
    public String getTopicSpace() throws JMSException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "getTopicSpace");
        String result = getDestName();
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "getTopicSpace", result);
        return result;
    }
1774
public JSONObject getMessage() throws ActivityException {
        String message = null;
        String slackMessageName = getAttributeValueSmart(SLACK_MESSAGE);
        if (slackMessageName == null)
            throw new ActivityException("slack message attribute is not set");
        Asset template = AssetCache.getAsset(slackMessageName);

        if (template == null) {
            message = slackMessageName;
        }
        else {
            message = context.evaluateToString(template.getStringContent());
        }

        JSONObject json = new JSONObject();
        String env = ApplicationContext.getRuntimeEnvironment().toUpperCase();
        json.put("text", env + " - " + getSlackPrefix() + " - " + message);

        String altText = null;
        if (json.has("text")) {
            String text = json.getString("text");
            if (text.length() > 200)
                altText = text.substring(0, 197) + "...";
        }
        if (altText != null)
            json.put("text", altText);
        return json;
    }
1032802
public JSONObject getJson() throws JSONException {
        JSONObject json = create();
        if (getDescription() != null && !getDescription().isEmpty())
          json.put("description", getDescription());
        if (attributes != null && !attributes.isEmpty()) {
            json.put("attributes", Attribute.getAttributesJson(attributes));
        }
        if (activities != null && !activities.isEmpty()) {
            JSONArray activitiesJson = new JSONArray();
            for (Activity activity : activities) {
                JSONObject activityJson = activity.getJson();
                List<Transition> transitions = getAllTransitions(activity.getId());
                if (transitions != null && !transitions.isEmpty()) {
                    JSONArray transitionsJson = new JSONArray();
                    for (Transition transition : transitions) {
                        JSONObject transitionJson = transition.getJson();
                        if (transition.getToId() < 0) // newly created
                            transitionJson.put("to", getActivityVO(transition.getToId()).getLogicalId());
                        transitionsJson.put(transitionJson);
                    }
                    activityJson.put("transitions", transitionsJson);
                }
                activitiesJson.put(activityJson);
            }
            json.put("activities", activitiesJson);
        }
        if (subprocesses != null && !subprocesses.isEmpty()) {
            JSONArray subprocsJson = new JSONArray();
            for (Process subproc : subprocesses) {
                JSONObject subprocJson = subproc.getJson();
                String logicalId = subproc.getAttribute(WorkAttributeConstant.LOGICAL_ID);
                subprocJson.put("id", logicalId);
                subprocJson.put("name", subproc.getName());
                if (subprocJson.has("version"))
                  subprocJson.remove("version");
                subprocsJson.put(subprocJson);
            }
            json.put("subprocesses", subprocsJson);
        }
        if (textNotes != null && !textNotes.isEmpty()) {
            JSONArray textNotesJson = new JSONArray();
            for (TextNote textNote : textNotes)
                textNotesJson.put(textNote.getJson());
            json.put("textNotes", textNotesJson);
        }
        if (variables != null && !variables.isEmpty()) {
            JSONObject variablesJson = create();
            for (Variable variable : variables)
                variablesJson.put(variable.getJsonName(), variable.getJson());
            json.put("variables", variablesJson);
        }

        return json;
    }
1119053
private static String getValue(JSONTokener x) throws JSONException {
    char c;
    char q;
    StringBuffer sb;
    do {
      c = x.next();
    } while (c == ' ' || c == '\t');
    switch (c) {
    case 0:
      return null;
    case '"':
    case '\'':
      q = c;
      sb = new StringBuffer();
      for (;;) {
        c = x.next();
        if (c == q) {
          break;
        }
        if (c == 0 || c == '\n' || c == '\r') {
          throw x.syntaxError("Missing close quote '" + q + "'.");
        }
        sb.append(c);
      }
      return sb.toString();
    case ',':
      x.back();
      return "";
    default:
      x.back();
      return x.nextTo(',');
    }
  }
1197874
public JsonNode getDataAttrs() {
        Lock lock = lockForRead();
        try {
            if (dataJson == null || dataJson instanceof NullNode
                    || dataJson instanceof MissingNode) {
                return null;
            }
            return dataJson.deepCopy();
        } finally {
            lock.unlock();
        }
    }
622268
public JSONObject getJson() throws JSONException {
        JSONObject json = create();
        json.put("id", getLogicalId());
        json.put("to", "A" + toId);
        if (completionCode != null)
            json.put("resultCode", completionCode);
        if (eventType != null)
            json.put("event", EventType.getEventTypeName(eventType));
        if (attributes != null && ! attributes.isEmpty())
            json.put("attributes", Attribute.getAttributesJson(attributes));
        return json;
    }
384584
@Override
	public String getText()
	{
		if(this.target == null)
			return null;
		
			try
			{
				
				//Check if load of template needed
				if((this.template == null || this.template.length() == 0) && this.templateName != null)
				{
					try
					{
						this.template = Text.loadTemplate(templateName);
					}
					catch(Exception e)
					{
						throw new SetupException("Cannot load template:"+templateName,e);
					}
				}
				
				Map<Object,Object> faultMap = JavaBean.toMap(this.target);
				
				
				if(this.argumentTextDecorator != null)
				{
					this.argumentTextDecorator.setTarget(this.target.getArgument());
					
					faultMap.put(this.argumentKeyName, this.argumentTextDecorator.getText());
				}
				
				return Text.format(this.template, faultMap);
			}
			catch (FormatException e)
			{
				throw new FormatFaultException(this.template, e);
			}

		
	}
167263
private String getTextField(JsonNode json, String fieldName) {
        if (!json.has(fieldName)) {
            return null;
        }
        return json.get(fieldName).asText();
    }
1167337
public T getNext() throws IOException {
    try {
      return mapper.readValue(jsonParser, clazz);
    } catch (EOFException e) {
      return null;
    }
  }
449319
@JsonValue
	@SuppressWarnings("unchecked")
	public <T> T get(){
		return (T) (this.isString ? (String)this.value : (Number)this.value);
	}
138553
public String json(String text) {
        if (text == null || text.isEmpty()) {
            return text;
        }
        return StringEscapeUtils.escapeJson(text);
    }
452356
protected AstNode text() throws ScanException, ParseException {
		AstNode v = null;
		if (token.getSymbol() == TEXT) {
			v = new AstText(token.getImage());
			consumeToken();
		}
		return v;
	}