agave-apps/apps-core/src/main/java/org/iplantc/service/apps/util/ServiceUtils.java
/**
	 * Checks whether a string is a valid JSON array of value nodes.
	 * This is used primarily when checking for job input arrays to enquote.
	 * 
	 * @param sJson String to check
	 * @return True if a json array with only value nodes
	 */
Checks whether a string is a valid JSON array of value nodes.
This is used primarily when checking for job input arrays to enquote.

@param sJson String to check
@return True if a json array with only value nodes
Checks whether a string is a valid JSON array of value nodes . This is used primarily when checking for job input arrays to enquote . @param sJson String to check @return True if a json array with only value nodes
public static boolean isJsonArrayOfStrings(final String sJson) 
	{
		try 
		{
			final JsonNode json = new ObjectMapper().readTree(sJson);
			if (json.isArray())
			{
				for(Iterator<JsonNode> iter = json.elements(); iter.hasNext(); ) 
				{
					JsonNode child = iter.next();
					if (!child.isValueNode()) {
						return false;
					}
				}
			} 
			else
			{
	    	  return false;
			}
			return true;
		} 
		catch (Exception jpe) {
			return false;
		}
	}
public static boolean isJsonArrayOfStrings ( final String sJson ) { try { final JsonNode json = new ObjectMapper ( ) . readTree ( sJson ) ; if ( json . isArray ( ) ) { for ( Iterator < JsonNode > iter = json . elements ( ) ; iter . hasNext ( ) ; ) { JsonNode child = iter . next ( ) ; if ( ! child . isValueNode ( ) ) { return false ; } } } else { return false ; } return true ; } catch ( Exception jpe ) { return false ; } }
Checks whether a string is a valid JSON array of value nodes.
Checks whether a string is a valid JSON array of value nodes .