bson 4.1.1 → 5.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (226) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +106 -7
  3. data/Rakefile +86 -43
  4. data/ext/bson/{native-endian.h → bson-endian.h} +14 -107
  5. data/ext/bson/bson-native.h +135 -0
  6. data/ext/bson/bytebuf.c +133 -0
  7. data/ext/bson/endian.c +117 -0
  8. data/ext/bson/extconf.rb +8 -3
  9. data/ext/bson/init.c +364 -0
  10. data/ext/bson/libbson-utf8.c +230 -0
  11. data/ext/bson/read.c +470 -0
  12. data/ext/bson/util.c +250 -0
  13. data/ext/bson/write.c +675 -0
  14. data/lib/bson/active_support.rb +19 -0
  15. data/lib/bson/array.rb +97 -30
  16. data/lib/bson/big_decimal.rb +77 -0
  17. data/lib/bson/binary.rb +510 -70
  18. data/lib/bson/boolean.rb +15 -4
  19. data/lib/bson/code.rb +25 -12
  20. data/lib/bson/code_with_scope.rb +41 -15
  21. data/lib/bson/config.rb +3 -28
  22. data/lib/bson/date.rb +16 -4
  23. data/lib/bson/date_time.rb +6 -4
  24. data/lib/bson/db_pointer.rb +110 -0
  25. data/lib/bson/dbref.rb +154 -0
  26. data/lib/bson/decimal128/builder.rb +456 -0
  27. data/lib/bson/decimal128.rb +272 -0
  28. data/lib/bson/document.rb +177 -7
  29. data/lib/bson/environment.rb +17 -2
  30. data/lib/bson/error/bson_decode_error.rb +11 -0
  31. data/lib/bson/error/ext_json_parse_error.rb +11 -0
  32. data/lib/bson/error/illegal_key.rb +23 -0
  33. data/lib/bson/error/invalid_binary_type.rb +37 -0
  34. data/lib/bson/error/invalid_dbref_argument.rb +12 -0
  35. data/lib/bson/error/invalid_decimal128_argument.rb +25 -0
  36. data/lib/bson/error/invalid_decimal128_range.rb +27 -0
  37. data/lib/bson/error/invalid_decimal128_string.rb +26 -0
  38. data/lib/bson/error/invalid_key.rb +24 -0
  39. data/lib/bson/error/invalid_object_id.rb +11 -0
  40. data/lib/bson/error/invalid_regexp_pattern.rb +13 -0
  41. data/lib/bson/error/unrepresentable_precision.rb +19 -0
  42. data/lib/bson/error/unserializable_class.rb +13 -0
  43. data/lib/bson/error/unsupported_binary_subtype.rb +12 -0
  44. data/lib/bson/error/unsupported_type.rb +11 -0
  45. data/lib/bson/error.rb +22 -0
  46. data/lib/bson/ext_json.rb +389 -0
  47. data/lib/bson/false_class.rb +6 -4
  48. data/lib/bson/float.rb +43 -7
  49. data/lib/bson/hash.rb +152 -37
  50. data/lib/bson/int32.rb +104 -6
  51. data/lib/bson/int64.rb +111 -8
  52. data/lib/bson/integer.rb +43 -9
  53. data/lib/bson/json.rb +3 -1
  54. data/lib/bson/max_key.rb +21 -10
  55. data/lib/bson/min_key.rb +21 -10
  56. data/lib/bson/nil_class.rb +7 -3
  57. data/lib/bson/object.rb +25 -17
  58. data/lib/bson/object_id.rb +98 -113
  59. data/lib/bson/open_struct.rb +59 -0
  60. data/lib/bson/regexp.rb +129 -56
  61. data/lib/bson/registry.rb +7 -10
  62. data/lib/bson/specialized.rb +8 -4
  63. data/lib/bson/string.rb +12 -32
  64. data/lib/bson/symbol.rb +107 -11
  65. data/lib/bson/time.rb +68 -7
  66. data/lib/bson/time_with_zone.rb +67 -0
  67. data/lib/bson/timestamp.rb +50 -10
  68. data/lib/bson/true_class.rb +6 -4
  69. data/lib/bson/undefined.rb +28 -2
  70. data/lib/bson/vector.rb +44 -0
  71. data/lib/bson/version.rb +6 -14
  72. data/lib/bson.rb +22 -12
  73. data/spec/README.md +14 -0
  74. data/spec/bson/array_spec.rb +38 -62
  75. data/spec/bson/big_decimal_spec.rb +328 -0
  76. data/spec/bson/binary_spec.rb +199 -53
  77. data/spec/bson/binary_uuid_spec.rb +190 -0
  78. data/spec/bson/boolean_spec.rb +2 -1
  79. data/spec/bson/byte_buffer_read_spec.rb +198 -0
  80. data/spec/bson/byte_buffer_spec.rb +122 -381
  81. data/spec/bson/byte_buffer_write_spec.rb +855 -0
  82. data/spec/bson/code_spec.rb +6 -4
  83. data/spec/bson/code_with_scope_spec.rb +6 -4
  84. data/spec/bson/config_spec.rb +1 -35
  85. data/spec/bson/date_spec.rb +2 -1
  86. data/spec/bson/date_time_spec.rb +55 -1
  87. data/spec/bson/dbref_legacy_spec.rb +186 -0
  88. data/spec/bson/dbref_spec.rb +487 -0
  89. data/spec/bson/decimal128_spec.rb +1840 -0
  90. data/spec/bson/document_as_spec.rb +61 -0
  91. data/spec/bson/document_spec.rb +205 -32
  92. data/spec/bson/ext_json_parse_spec.rb +346 -0
  93. data/spec/bson/false_class_spec.rb +9 -1
  94. data/spec/bson/float_spec.rb +42 -1
  95. data/spec/bson/hash_as_spec.rb +58 -0
  96. data/spec/bson/hash_spec.rb +318 -66
  97. data/spec/bson/int32_spec.rb +248 -1
  98. data/spec/bson/int64_spec.rb +308 -1
  99. data/spec/bson/integer_spec.rb +61 -3
  100. data/spec/bson/json_spec.rb +2 -1
  101. data/spec/bson/max_key_spec.rb +6 -4
  102. data/spec/bson/min_key_spec.rb +6 -4
  103. data/spec/bson/nil_class_spec.rb +2 -1
  104. data/spec/bson/object_id_spec.rb +95 -5
  105. data/spec/bson/object_spec.rb +3 -2
  106. data/spec/bson/open_struct_spec.rb +87 -0
  107. data/spec/bson/raw_spec.rb +594 -0
  108. data/spec/bson/regexp_spec.rb +61 -8
  109. data/spec/bson/registry_spec.rb +3 -2
  110. data/spec/bson/string_spec.rb +26 -33
  111. data/spec/bson/symbol_raw_spec.rb +70 -0
  112. data/spec/bson/symbol_spec.rb +77 -20
  113. data/spec/bson/time_spec.rb +206 -2
  114. data/spec/bson/time_with_zone_spec.rb +69 -0
  115. data/spec/bson/timestamp_spec.rb +58 -2
  116. data/spec/bson/true_class_spec.rb +9 -1
  117. data/spec/bson/undefined_spec.rb +28 -1
  118. data/spec/bson/vector_spec.rb +33 -0
  119. data/spec/bson_spec.rb +2 -1
  120. data/spec/runners/binary_vector.rb +78 -0
  121. data/spec/runners/common_driver.rb +348 -0
  122. data/spec/runners/corpus.rb +191 -0
  123. data/spec/runners/corpus_legacy.rb +248 -0
  124. data/spec/shared/LICENSE +20 -0
  125. data/spec/shared/bin/get-mongodb-download-url +17 -0
  126. data/spec/shared/bin/s3-copy +45 -0
  127. data/spec/shared/bin/s3-upload +69 -0
  128. data/spec/shared/lib/mrss/child_process_helper.rb +80 -0
  129. data/spec/shared/lib/mrss/cluster_config.rb +231 -0
  130. data/spec/shared/lib/mrss/constraints.rb +378 -0
  131. data/spec/shared/lib/mrss/docker_runner.rb +298 -0
  132. data/spec/shared/lib/mrss/eg_config_utils.rb +51 -0
  133. data/spec/shared/lib/mrss/event_subscriber.rb +210 -0
  134. data/spec/shared/lib/mrss/lite_constraints.rb +238 -0
  135. data/spec/shared/lib/mrss/release/candidate.rb +281 -0
  136. data/spec/shared/lib/mrss/release/product_data.rb +144 -0
  137. data/spec/shared/lib/mrss/server_version_registry.rb +113 -0
  138. data/spec/shared/lib/mrss/session_registry.rb +69 -0
  139. data/spec/shared/lib/mrss/session_registry_legacy.rb +60 -0
  140. data/spec/shared/lib/mrss/spec_organizer.rb +179 -0
  141. data/spec/shared/lib/mrss/utils.rb +37 -0
  142. data/spec/shared/lib/tasks/candidate.rake +64 -0
  143. data/spec/shared/share/Dockerfile.erb +251 -0
  144. data/spec/shared/share/haproxy-1.conf +16 -0
  145. data/spec/shared/share/haproxy-2.conf +17 -0
  146. data/spec/shared/shlib/config.sh +27 -0
  147. data/spec/shared/shlib/distro.sh +84 -0
  148. data/spec/shared/shlib/server.sh +423 -0
  149. data/spec/shared/shlib/set_env.sh +110 -0
  150. data/spec/spec_helper.rb +61 -1
  151. data/spec/spec_tests/binary_vector_spec.rb +82 -0
  152. data/spec/spec_tests/common_driver_spec.rb +84 -0
  153. data/spec/spec_tests/corpus_legacy_spec.rb +72 -0
  154. data/spec/spec_tests/corpus_spec.rb +134 -0
  155. data/spec/spec_tests/data/binary_vector/README.md +61 -0
  156. data/spec/spec_tests/data/binary_vector/float32.json +65 -0
  157. data/spec/spec_tests/data/binary_vector/int8.json +57 -0
  158. data/spec/spec_tests/data/binary_vector/packed_bit.json +83 -0
  159. data/spec/spec_tests/data/corpus/README.md +15 -0
  160. data/spec/spec_tests/data/corpus/array.json +49 -0
  161. data/spec/spec_tests/data/corpus/binary.json +153 -0
  162. data/spec/spec_tests/data/corpus/boolean.json +27 -0
  163. data/spec/spec_tests/data/corpus/code.json +67 -0
  164. data/spec/spec_tests/data/corpus/code_w_scope.json +78 -0
  165. data/spec/spec_tests/data/corpus/datetime.json +42 -0
  166. data/spec/spec_tests/data/corpus/dbpointer.json +56 -0
  167. data/spec/spec_tests/data/corpus/dbref.json +51 -0
  168. data/spec/spec_tests/data/corpus/decimal128-1.json +317 -0
  169. data/spec/spec_tests/data/corpus/decimal128-2.json +793 -0
  170. data/spec/spec_tests/data/corpus/decimal128-3.json +1771 -0
  171. data/spec/spec_tests/data/corpus/decimal128-4.json +165 -0
  172. data/spec/spec_tests/data/corpus/decimal128-5.json +402 -0
  173. data/spec/spec_tests/data/corpus/decimal128-6.json +131 -0
  174. data/spec/spec_tests/data/corpus/decimal128-7.json +327 -0
  175. data/spec/spec_tests/data/corpus/document.json +60 -0
  176. data/spec/spec_tests/data/corpus/double.json +87 -0
  177. data/spec/spec_tests/data/corpus/int32.json +43 -0
  178. data/spec/spec_tests/data/corpus/int64.json +43 -0
  179. data/spec/spec_tests/data/corpus/maxkey.json +12 -0
  180. data/spec/spec_tests/data/corpus/minkey.json +12 -0
  181. data/spec/spec_tests/data/corpus/multi-type-deprecated.json +15 -0
  182. data/spec/spec_tests/data/corpus/multi-type.json +11 -0
  183. data/spec/spec_tests/data/corpus/null.json +12 -0
  184. data/spec/spec_tests/data/corpus/oid.json +28 -0
  185. data/spec/spec_tests/data/corpus/regex.json +65 -0
  186. data/spec/spec_tests/data/corpus/string.json +72 -0
  187. data/spec/spec_tests/data/corpus/symbol.json +80 -0
  188. data/spec/spec_tests/data/corpus/timestamp.json +34 -0
  189. data/spec/spec_tests/data/corpus/top.json +262 -0
  190. data/spec/spec_tests/data/corpus/undefined.json +15 -0
  191. data/spec/spec_tests/data/corpus_legacy/array.json +49 -0
  192. data/spec/spec_tests/data/corpus_legacy/binary.json +69 -0
  193. data/spec/spec_tests/data/corpus_legacy/boolean.json +27 -0
  194. data/spec/spec_tests/data/corpus_legacy/code.json +67 -0
  195. data/spec/spec_tests/data/corpus_legacy/code_w_scope.json +78 -0
  196. data/spec/spec_tests/data/corpus_legacy/document.json +36 -0
  197. data/spec/spec_tests/data/corpus_legacy/double.json +69 -0
  198. data/spec/spec_tests/data/corpus_legacy/failures/datetime.json +31 -0
  199. data/spec/spec_tests/data/corpus_legacy/failures/dbpointer.json +42 -0
  200. data/spec/spec_tests/data/corpus_legacy/failures/int64.json +38 -0
  201. data/spec/spec_tests/data/corpus_legacy/failures/symbol.json +62 -0
  202. data/spec/spec_tests/data/corpus_legacy/int32.json +38 -0
  203. data/spec/spec_tests/data/corpus_legacy/maxkey.json +12 -0
  204. data/spec/spec_tests/data/corpus_legacy/minkey.json +12 -0
  205. data/spec/spec_tests/data/corpus_legacy/null.json +12 -0
  206. data/spec/spec_tests/data/corpus_legacy/oid.json +28 -0
  207. data/spec/spec_tests/data/corpus_legacy/regex.json +37 -0
  208. data/spec/spec_tests/data/corpus_legacy/string.json +67 -0
  209. data/spec/spec_tests/data/corpus_legacy/timestamp.json +18 -0
  210. data/spec/spec_tests/data/corpus_legacy/top.json +62 -0
  211. data/spec/spec_tests/data/corpus_legacy/undefined.json +13 -0
  212. data/spec/spec_tests/data/decimal128/decimal128-1.json +363 -0
  213. data/spec/spec_tests/data/decimal128/decimal128-2.json +793 -0
  214. data/spec/spec_tests/data/decimal128/decimal128-3.json +1771 -0
  215. data/spec/spec_tests/data/decimal128/decimal128-4.json +165 -0
  216. data/spec/spec_tests/data/decimal128/decimal128-5.json +402 -0
  217. data/spec/spec_tests/data/decimal128/decimal128-6.json +131 -0
  218. data/spec/spec_tests/data/decimal128/decimal128-7.json +327 -0
  219. data/spec/support/shared_examples.rb +32 -11
  220. data/spec/support/spec_config.rb +17 -0
  221. data/spec/support/utils.rb +58 -0
  222. metadata +284 -45
  223. checksums.yaml.gz.sig +0 -3
  224. data/ext/bson/native.c +0 -722
  225. data.tar.gz.sig +0 -0
  226. metadata.gz.sig +0 -0
@@ -0,0 +1,363 @@
1
+ {
2
+ "description": "Decimal128",
3
+ "bson_type": "0x13",
4
+ "test_key": "d",
5
+ "valid": [
6
+ {
7
+ "description": "Special - Canonical NaN",
8
+ "subject": "180000001364000000000000000000000000000000007C00",
9
+ "string": "NaN",
10
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"NaN\"}}"
11
+ },
12
+ {
13
+ "description": "Special - Negative NaN",
14
+ "subject": "18000000136400000000000000000000000000000000FC00",
15
+ "string": "NaN",
16
+ "from_extjson": false,
17
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"NaN\"}}"
18
+ },
19
+ {
20
+ "description": "Special - Canonical SNaN",
21
+ "subject": "180000001364000000000000000000000000000000007E00",
22
+ "string": "NaN",
23
+ "from_extjson": false,
24
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"NaN\"}}"
25
+ },
26
+ {
27
+ "description": "Special - Negative SNaN",
28
+ "subject": "18000000136400000000000000000000000000000000FE00",
29
+ "string": "NaN",
30
+ "from_extjson": false,
31
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"NaN\"}}"
32
+ },
33
+ {
34
+ "description": "Special - NaN with a payload",
35
+ "subject": "180000001364001200000000000000000000000000007E00",
36
+ "string": "NaN",
37
+ "from_extjson": false,
38
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"NaN\"}}"
39
+ },
40
+ {
41
+ "description": "Special - Canonical Positive Infinity",
42
+ "subject": "180000001364000000000000000000000000000000007800",
43
+ "string": "Infinity",
44
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"Infinity\"}}"
45
+ },
46
+ {
47
+ "description": "Special - Canonical Negative Infinity",
48
+ "subject": "18000000136400000000000000000000000000000000F800",
49
+ "string": "-Infinity",
50
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"-Infinity\"}}"
51
+ },
52
+ {
53
+ "description": "Special - Invalid representation treated as 0",
54
+ "subject": "180000001364000000000000000000000000000000106C00",
55
+ "string": "0",
56
+ "from_extjson": false,
57
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"0\"}}"
58
+ },
59
+ {
60
+ "description": "Special - Invalid representation treated as -0",
61
+ "subject": "18000000136400DCBA9876543210DEADBEEF00000010EC00",
62
+ "string": "-0",
63
+ "from_extjson": false,
64
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"-0\"}}"
65
+ },
66
+ {
67
+ "description": "Special - Invalid representation treated as 0E3",
68
+ "subject": "18000000136400FFFFFFFFFFFFFFFFFFFFFFFFFFFF116C00",
69
+ "string": "0E+3",
70
+ "from_extjson": false,
71
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+3\"}}"
72
+ },
73
+ {
74
+ "description": "Regular - Adjusted Exponent Limit",
75
+ "subject": "18000000136400F2AF967ED05C82DE3297FF6FDE3CF22F00",
76
+ "string": "0.000001234567890123456789012345678901234",
77
+ "extjson": "{\"d\": { \"$numberDecimal\": \"0.000001234567890123456789012345678901234\" }}"
78
+ },
79
+ {
80
+ "description": "Regular - Smallest",
81
+ "subject": "18000000136400D204000000000000000000000000343000",
82
+ "string": "0.001234",
83
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"0.001234\"}}"
84
+ },
85
+ {
86
+ "description": "Regular - Smallest with Trailing Zeros",
87
+ "subject": "1800000013640040EF5A07000000000000000000002A3000",
88
+ "string": "0.00123400000",
89
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00123400000\"}}"
90
+ },
91
+ {
92
+ "description": "Regular - 0.1",
93
+ "subject": "1800000013640001000000000000000000000000003E3000",
94
+ "string": "0.1",
95
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"0.1\"}}"
96
+ },
97
+ {
98
+ "description": "Regular - 0.1234567890123456789012345678901234",
99
+ "subject": "18000000136400F2AF967ED05C82DE3297FF6FDE3CFC2F00",
100
+ "string": "0.1234567890123456789012345678901234",
101
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"0.1234567890123456789012345678901234\"}}"
102
+ },
103
+ {
104
+ "description": "Regular - 0",
105
+ "subject": "180000001364000000000000000000000000000000403000",
106
+ "string": "0",
107
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"0\"}}"
108
+ },
109
+ {
110
+ "description": "Regular - -0",
111
+ "subject": "18000000136400000000000000000000000000000040B000",
112
+ "string": "-0",
113
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"-0\"}}"
114
+ },
115
+ {
116
+ "description": "Regular - -0.0",
117
+ "subject": "1800000013640000000000000000000000000000003EB000",
118
+ "string": "-0.0",
119
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.0\"}}"
120
+ },
121
+ {
122
+ "description": "Regular - 2",
123
+ "subject": "180000001364000200000000000000000000000000403000",
124
+ "string": "2",
125
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"2\"}}"
126
+ },
127
+ {
128
+ "description": "Regular - 2.000",
129
+ "subject": "18000000136400D0070000000000000000000000003A3000",
130
+ "string": "2.000",
131
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"2.000\"}}"
132
+ },
133
+ {
134
+ "description": "Regular - Largest",
135
+ "subject": "18000000136400F2AF967ED05C82DE3297FF6FDE3C403000",
136
+ "string": "1234567890123456789012345678901234",
137
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"1234567890123456789012345678901234\"}}"
138
+ },
139
+ {
140
+ "description": "Scientific - Tiniest",
141
+ "subject": "18000000136400FFFFFFFF638E8D37C087ADBE09ED010000",
142
+ "string": "9.999999999999999999999999999999999E-6143",
143
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"9.999999999999999999999999999999999E-6143\"}}"
144
+ },
145
+ {
146
+ "description": "Scientific - Tiny",
147
+ "subject": "180000001364000100000000000000000000000000000000",
148
+ "string": "1E-6176",
149
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"1E-6176\"}}"
150
+ },
151
+ {
152
+ "description": "Scientific - Negative Tiny",
153
+ "subject": "180000001364000100000000000000000000000000008000",
154
+ "string": "-1E-6176",
155
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"-1E-6176\"}}"
156
+ },
157
+ {
158
+ "description": "Scientific - Adjusted Exponent Limit",
159
+ "subject": "18000000136400F2AF967ED05C82DE3297FF6FDE3CF02F00",
160
+ "string": "1.234567890123456789012345678901234E-7",
161
+ "extjson": "{\"d\": { \"$numberDecimal\": \"1.234567890123456789012345678901234E-7\" }}"
162
+ },
163
+ {
164
+ "description": "Scientific - Fractional",
165
+ "subject": "1800000013640064000000000000000000000000002CB000",
166
+ "string": "-1.00E-8",
167
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"-1.00E-8\"}}"
168
+ },
169
+ {
170
+ "description": "Scientific - 0 with Exponent",
171
+ "subject": "180000001364000000000000000000000000000000205F00",
172
+ "string": "0E+6000",
173
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+6000\"}}"
174
+ },
175
+ {
176
+ "description": "Scientific - 0 with Negative Exponent",
177
+ "subject": "1800000013640000000000000000000000000000007A2B00",
178
+ "string": "0E-611",
179
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"0E-611\"}}"
180
+ },
181
+ {
182
+ "description": "Scientific - No Decimal with Signed Exponent",
183
+ "subject": "180000001364000100000000000000000000000000463000",
184
+ "string": "1E+3",
185
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+3\"}}"
186
+ },
187
+ {
188
+ "description": "Scientific - Trailing Zero",
189
+ "subject": "180000001364001A04000000000000000000000000423000",
190
+ "string": "1.050E+4",
191
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"1.050E+4\"}}"
192
+ },
193
+ {
194
+ "description": "Scientific - With Decimal",
195
+ "subject": "180000001364006900000000000000000000000000423000",
196
+ "string": "1.05E+3",
197
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"1.05E+3\"}}"
198
+ },
199
+ {
200
+ "description": "Scientific - Full",
201
+ "subject": "18000000136400FFFFFFFFFFFFFFFFFFFFFFFFFFFF403000",
202
+ "string": "5192296858534827628530496329220095",
203
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"5192296858534827628530496329220095\"}}"
204
+ },
205
+ {
206
+ "description": "Scientific - Large",
207
+ "subject": "18000000136400000000000A5BC138938D44C64D31FE5F00",
208
+ "string": "1.000000000000000000000000000000000E+6144",
209
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000000000000000000000000000000E+6144\"}}"
210
+ },
211
+ {
212
+ "description": "Scientific - Largest",
213
+ "subject": "18000000136400FFFFFFFF638E8D37C087ADBE09EDFF5F00",
214
+ "string": "9.999999999999999999999999999999999E+6144",
215
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"9.999999999999999999999999999999999E+6144\"}}"
216
+ },
217
+ {
218
+ "description": "Non-Canonical Parsing - Exponent Normalization",
219
+ "subject": "1800000013640064000000000000000000000000002CB000",
220
+ "string": "-1.00E-8",
221
+ "to_extjson": false,
222
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"-100E-10\"}}"
223
+ },
224
+ {
225
+ "description": "Non-Canonical Parsing - Unsigned Positive Exponent",
226
+ "subject": "180000001364000100000000000000000000000000463000",
227
+ "string": "1E+3",
228
+ "to_extjson": false,
229
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"1E3\"}}"
230
+ },
231
+ {
232
+ "description": "Non-Canonical Parsing - Lowercase Exponent Identifier",
233
+ "subject": "180000001364000100000000000000000000000000463000",
234
+ "string": "1E+3",
235
+ "to_extjson": false,
236
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"1e+3\"}}"
237
+ },
238
+ {
239
+ "description": "Non-Canonical Parsing - Long Significand with Exponent",
240
+ "subject": "1800000013640079D9E0F9763ADA429D0200000000583000",
241
+ "string": "1.2345689012345789012345E+34",
242
+ "to_extjson": false,
243
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"12345689012345789012345E+12\"}}"
244
+ },
245
+ {
246
+ "description": "Non-Canonical Parsing - Positive Sign",
247
+ "subject": "18000000136400F2AF967ED05C82DE3297FF6FDE3C403000",
248
+ "string": "1234567890123456789012345678901234",
249
+ "to_extjson": false,
250
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"+1234567890123456789012345678901234\"}}"
251
+ },
252
+ {
253
+ "description": "Non-Canonical Parsing - Long Decimal String",
254
+ "subject": "180000001364000100000000000000000000000000722800",
255
+ "string": "1E-999",
256
+ "to_extjson": false,
257
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \".000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001\"}}"
258
+ },
259
+ {
260
+ "description": "Non-Canonical Parsing - nan",
261
+ "subject": "180000001364000000000000000000000000000000007C00",
262
+ "string": "NaN",
263
+ "to_extjson": false,
264
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"nan\"}}"
265
+ },
266
+ {
267
+ "description": "Non-Canonical Parsing - nAn",
268
+ "subject": "180000001364000000000000000000000000000000007C00",
269
+ "string": "NaN",
270
+ "to_extjson": false,
271
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"nAn\"}}"
272
+ },
273
+ {
274
+ "description": "Non-Canonical Parsing - +infinity",
275
+ "subject": "180000001364000000000000000000000000000000007800",
276
+ "string": "Infinity",
277
+ "to_extjson": false,
278
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"+infinity\"}}"
279
+ },
280
+ {
281
+ "description": "Non-Canonical Parsing - infinity",
282
+ "subject": "180000001364000000000000000000000000000000007800",
283
+ "string": "Infinity",
284
+ "to_extjson": false,
285
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"infinity\"}}"
286
+ },
287
+ {
288
+ "description": "Non-Canonical Parsing - infiniTY",
289
+ "subject": "180000001364000000000000000000000000000000007800",
290
+ "string": "Infinity",
291
+ "to_extjson": false,
292
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"infiniTY\"}}"
293
+ },
294
+ {
295
+ "description": "Non-Canonical Parsing - inf",
296
+ "subject": "180000001364000000000000000000000000000000007800",
297
+ "string": "Infinity",
298
+ "to_extjson": false,
299
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"inf\"}}"
300
+ },
301
+ {
302
+ "description": "Non-Canonical Parsing - inF",
303
+ "subject": "180000001364000000000000000000000000000000007800",
304
+ "string": "Infinity",
305
+ "to_extjson": false,
306
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"inF\"}}"
307
+ },
308
+ {
309
+ "description": "Non-Canonical Parsing - -infinity",
310
+ "subject": "18000000136400000000000000000000000000000000F800",
311
+ "string": "-Infinity",
312
+ "to_extjson": false,
313
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"-infinity\"}}"
314
+ },
315
+ {
316
+ "description": "Non-Canonical Parsing - -infiniTy",
317
+ "subject": "18000000136400000000000000000000000000000000F800",
318
+ "string": "-Infinity",
319
+ "to_extjson": false,
320
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"-infiniTy\"}}"
321
+ },
322
+ {
323
+ "description": "Non-Canonical Parsing - -Inf",
324
+ "subject": "18000000136400000000000000000000000000000000F800",
325
+ "string": "-Infinity",
326
+ "to_extjson": false,
327
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"-Infinity\"}}"
328
+ },
329
+ {
330
+ "description": "Non-Canonical Parsing - -inf",
331
+ "subject": "18000000136400000000000000000000000000000000F800",
332
+ "string": "-Infinity",
333
+ "to_extjson": false,
334
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"-inf\"}}"
335
+ },
336
+ {
337
+ "description": "Non-Canonical Parsing - -inF",
338
+ "subject": "18000000136400000000000000000000000000000000F800",
339
+ "string": "-Infinity",
340
+ "to_extjson": false,
341
+ "extjson": "{\"d\" : {\"$numberDecimal\" : \"-inF\"}}"
342
+ },
343
+ {
344
+ "description": "Rounded Subnormal number",
345
+ "subject": "180000001364000100000000000000000000000000000000",
346
+ "string": "10E-6177",
347
+ "match_string": "1E-6176"
348
+ },
349
+ {
350
+ "description": "Clamped",
351
+ "subject": "180000001364000a00000000000000000000000000fe5f00",
352
+ "string": "1E6112",
353
+ "match_string": "1.0E+6112"
354
+ },
355
+ {
356
+ "description": "Exact rounding",
357
+ "subject": "18000000136400000000000a5bc138938d44c64d31cc3700",
358
+ "string": "1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
359
+ "match_string": "1.000000000000000000000000000000000E+999"
360
+ }
361
+
362
+ ]
363
+ }