1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/// The syntax a number is written in.
///
/// Everything here is an associated constant, so a parser instantiated for a
/// given syntax is specialized down to the forms that syntax actually accepts
/// and pays nothing for the ones it does not.
///
/// Note that a trailing point, as in `42.`, is accepted regardless of the
/// syntax. Canonical JSON does not permit it, but the JSON parser has always
/// accepted it and rejecting it now would be a breaking change.
///
/// This governs integers exactly. Floats are only steered by it as far as
/// deciding what to pick off before the digits reach the conversion in
/// [`dec2flt`], which accepts a superset of all of them.
///
/// [`dec2flt`]: crate::dec2flt
pub
/// Numbers as [RFC 8259] spells them, which is what the [`json`] module reads
/// and what SQLite stores in its `INT` and `FLOAT` elements.
///
/// [RFC 8259]: https://datatracker.ietf.org/doc/html/rfc8259#section-6
/// [`json`]: crate::json
pub ;
/// Numbers as [JSON5] spells them, which is what SQLite stores in its `INT5`
/// and `FLOAT5` elements.
///
/// This is a superset of [`Json`] which additionally permits a leading `+`,
/// hexadecimal integers, a number with no digits before its point, and, since
/// SQLite is the one writing these, a redundant leading zero.
///
/// [JSON5]: https://spec.json5.org/#numbers
pub ;