BooleanIndicates true or false. JSON risk accepts
true and false literals0 represents false and any other number represents true"true", "yes", "y" and their uppercase or partial uppercase equivalents represent true and anything else represents false. Leading and trailing whiltespace is ignored.Boolean vectorA vector of Boolean values, as used in, e.g., the attribute interest_capitalization. JSON risk accepts
Boolean value as specified above, representing a single-entry vectorBoolean values as specified aboveBoolean values as specified above, separated by one or more whitespace characters. The string "true FALSE 0 1 yEs y" is a valid example.DateA value representing a calendar date. JSON risk accepts
new Date(2020,0,27)"27.01.2020""2020-01-27"2020/01/27Consequently, a valid date is created when calling JSON.parse() on a JSON encoded date like "2020-01-27T23:28:56.782Z". All examples represent January 27th, 2020 obviously.
Date vectorA vector of Date values, as used in, e.g., the attribute conditions_valid_until. JSON risk accepts
Date value as specified above, representing a single-entry vectorDate values as specified aboveDate values as specified above, separated by one or more whitespace characters. The string "2020-01-01 2020/02/01 01.03.2020" is a valid example.NaturalA numeric integer with zero or positive value. JSON risk accepts
0, 1, 2 et ceteraparseFloat function converts to a natural number, "0", "1" or "2.000" are valid examples.NumberA numeric value. JSON risk accepts
0.1, 1, -10.99 et ceteraparseFloat() function.For convenience, any parseable string the last non-whitespace character of which contains the percentage sign is interpreted as a percentage. For example "3.50%", "3.5 %" and "0.035" all represent the same value.
Number vectorA vector of Number values, as used in, e.g., the attribute fixed_rate. JSON risk accepts
Number value as specified above, representing a single-entry vectorNumber values as specified aboveNumber values as specified above, separated by one or more whitespace characters. The string "0.01 1.5% 2%" is a valid example.Period stringA JSON string representing a period. JSON risk accepts any string that
parseInt() function converts into an integer and"y", "m", "w" or "d" or their uppercase equivalents.The letters represent years, months, weeks and days, respectively. The strings "2d", "30W" and "16Y" are valid examples.
StringA JSON string.
JSON risk is published under the MIT License.
Library
Minified Library
App (.tar.gz)
App (.tar.bz2)
App (.zip)
This project is maintained by