com.atlassian.jira.functest.framework.util.json
Class TestJSONEscaper

java.lang.Object
  extended by com.atlassian.jira.functest.framework.util.json.TestJSONEscaper

public class TestJSONEscaper
extends Object

Escape util for JSON data

Since:
v3.13

Constructor Summary
TestJSONEscaper()
           
 
Method Summary
static String escape(String jsonStringValue)
          This will escape a value ready to go into a JSON string value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestJSONEscaper

public TestJSONEscaper()
Method Detail

escape

public static String escape(String jsonStringValue)
This will escape a value ready to go into a JSON string value.

NOTE : IT DOES NOT put the double quotes " around the string value and hence you can safely append the returned value to another JSON string value

This handles the use case where you are concattenating values that ultimately will be a JSON string value but you dont want double quotes around too early.

Parameters:
jsonStringValue - JSON string value
Returns:
an escaped JSON string value, returns empty string if the value is null


Copyright © 2002-2014 Atlassian. All Rights Reserved.