Class StringFunction


  • public class StringFunction
    extends FunctionBase
    From http://docs.jsonata.org/string-functions.html: $string(arg) Casts the arg parameter to a string using the following casting rules Strings are unchanged Functions are converted to an empty string Numeric infinity and NaN throw an error because they cannot be represented as a JSON number All other values are converted to a JSON string using the JSON.stringify function If arg is not specified (i.e. this function is invoked with no arguments), then the context value is used as the value of arg. Examples $string(5)=="5" [1..5].$string()==["1", "2", "3", "4", "5"] $string([1..5])=="[1,2,3,4,5]"