true on success, false on error (with errorMsg set).bool parseJsonNumber(const(char)[] lexeme, out var result, out string errorMsg,
bool preferSigned = true) @safeParse a JSON number literal and return the appropriate var type.
This function takes a number lexeme and parses it into the most appropriate numeric type according to JSON semantics:
long, use var.Type.LONG.ulong but not long, use var.Type.ULONG.var.Type.DOUBLE.preferSigned = false, non-negative integers that fit are reported as var.Type.ULONG instead of var.Type.LONG (negative integers remain LONG; there is no unsigned representation).lexeme | The number literal lexeme from the lexer. |
result | Output parameter for the parsed value. |
errorMsg | Output parameter for error message on failure. |
preferSigned | When true, prefer signed integers when value fits both; when false, prefer ulong for non-negative integers. |
true on success, false on error (with errorMsg set).