Class ClientRefDataQueryUtils
- java.lang.Object
-
- com.avoka.fc.core.servlet.dd.reference.ClientRefDataQueryUtils
-
public class ClientRefDataQueryUtils extends Object
provides a utility class for the CsvPropertyQuery- Since:
- 17.10.0
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<Map<String,String>>
getRowListFromCsv(String csvValue)
Reads a CSV string returning a row list Liststatic boolean
isJsonValid(String jsonCheck)
Performs a quick test to see if JSON is valid, then if passes uses Jackson to parse the JSONstatic boolean
isXml(String strCheck)
Quick test to see if a string is XML by checking the starting character is a "<" and ending char is ">".static String
toJson(Object object)
Converts an object to a JSON String with pretty print set using GsonBuilderstatic String
validateJson(String json)
validate json using Jackson, returning an error message String or null if no error exists.
-
-
-
Method Detail
-
isJsonValid
public static boolean isJsonValid(String jsonCheck)
Performs a quick test to see if JSON is valid, then if passes uses Jackson to parse the JSON- Parameters:
jsonCheck
- the string JSON value to validate- Returns:
- true if the String is valid JSON, otherwise false
-
validateJson
public static String validateJson(String json)
validate json using Jackson, returning an error message String or null if no error exists.- Parameters:
json
- The JSON String to validate- Returns:
- an error message String or null if no error exists.
-
isXml
public static boolean isXml(String strCheck)
Quick test to see if a string is XML by checking the starting character is a "<" and ending char is ">".- Parameters:
strCheck
- the string value to test- Returns:
- true if starts with "<" and ends with ">", otherwise false
-
getRowListFromCsv
public static List<Map<String,String>> getRowListFromCsv(String csvValue)
Reads a CSV string returning a row list List- Parameters:
csvValue
- the String property value containing the CSV- Returns:
- the generated rowList List
-
-