jsonata-rs 0.1.0__tar.gz

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 (35) hide show
  1. jsonata_rs-0.1.0/Cargo.lock +527 -0
  2. jsonata_rs-0.1.0/Cargo.toml +11 -0
  3. jsonata_rs-0.1.0/PKG-INFO +65 -0
  4. jsonata_rs-0.1.0/README.md +54 -0
  5. jsonata_rs-0.1.0/crates/jsonata/Cargo.toml +14 -0
  6. jsonata_rs-0.1.0/crates/jsonata/src/ast.rs +178 -0
  7. jsonata_rs-0.1.0/crates/jsonata/src/datetime.rs +1992 -0
  8. jsonata_rs-0.1.0/crates/jsonata/src/error.rs +172 -0
  9. jsonata_rs-0.1.0/crates/jsonata/src/errors.rs +104 -0
  10. jsonata_rs-0.1.0/crates/jsonata/src/evaluator.rs +1918 -0
  11. jsonata_rs-0.1.0/crates/jsonata/src/frame.rs +59 -0
  12. jsonata_rs-0.1.0/crates/jsonata/src/functions/collections.rs +325 -0
  13. jsonata_rs-0.1.0/crates/jsonata/src/functions/hof.rs +547 -0
  14. jsonata_rs-0.1.0/crates/jsonata/src/functions/misc.rs +260 -0
  15. jsonata_rs-0.1.0/crates/jsonata/src/functions/mod.rs +563 -0
  16. jsonata_rs-0.1.0/crates/jsonata/src/functions/numeric.rs +1500 -0
  17. jsonata_rs-0.1.0/crates/jsonata/src/functions/strings.rs +1302 -0
  18. jsonata_rs-0.1.0/crates/jsonata/src/json.rs +369 -0
  19. jsonata_rs-0.1.0/crates/jsonata/src/lib.rs +18 -0
  20. jsonata_rs-0.1.0/crates/jsonata/src/parser.rs +1553 -0
  21. jsonata_rs-0.1.0/crates/jsonata/src/signature.rs +683 -0
  22. jsonata_rs-0.1.0/crates/jsonata/src/tokenizer.rs +438 -0
  23. jsonata_rs-0.1.0/crates/jsonata/src/value.rs +381 -0
  24. jsonata_rs-0.1.0/crates/jsonata/test-overrides-local.json +15 -0
  25. jsonata_rs-0.1.0/crates/jsonata/test-overrides.json +159 -0
  26. jsonata_rs-0.1.0/crates/jsonata/tests/eval_smoke.rs +68 -0
  27. jsonata_rs-0.1.0/crates/jsonata/tests/json_smoke.rs +33 -0
  28. jsonata_rs-0.1.0/crates/jsonata/tests/junit_port.rs +481 -0
  29. jsonata_rs-0.1.0/crates/jsonata/tests/parser_smoke.rs +33 -0
  30. jsonata_rs-0.1.0/crates/jsonata/tests/suite.rs +419 -0
  31. jsonata_rs-0.1.0/crates/jsonata-py/Cargo.toml +15 -0
  32. jsonata_rs-0.1.0/crates/jsonata-py/README.md +54 -0
  33. jsonata_rs-0.1.0/crates/jsonata-py/src/lib.rs +230 -0
  34. jsonata_rs-0.1.0/crates/jsonata-py/tests/test_binding.py +85 -0
  35. jsonata_rs-0.1.0/pyproject.toml +22 -0
@@ -0,0 +1,527 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 4
4
+
5
+ [[package]]
6
+ name = "aho-corasick"
7
+ version = "1.1.4"
8
+ source = "registry+https://github.com/rust-lang/crates.io-index"
9
+ checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301"
10
+ dependencies = [
11
+ "memchr",
12
+ ]
13
+
14
+ [[package]]
15
+ name = "android_system_properties"
16
+ version = "0.1.5"
17
+ source = "registry+https://github.com/rust-lang/crates.io-index"
18
+ checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
19
+ dependencies = [
20
+ "libc",
21
+ ]
22
+
23
+ [[package]]
24
+ name = "autocfg"
25
+ version = "1.5.1"
26
+ source = "registry+https://github.com/rust-lang/crates.io-index"
27
+ checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"
28
+
29
+ [[package]]
30
+ name = "bit-set"
31
+ version = "0.8.0"
32
+ source = "registry+https://github.com/rust-lang/crates.io-index"
33
+ checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3"
34
+ dependencies = [
35
+ "bit-vec",
36
+ ]
37
+
38
+ [[package]]
39
+ name = "bit-vec"
40
+ version = "0.8.0"
41
+ source = "registry+https://github.com/rust-lang/crates.io-index"
42
+ checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7"
43
+
44
+ [[package]]
45
+ name = "bumpalo"
46
+ version = "3.20.3"
47
+ source = "registry+https://github.com/rust-lang/crates.io-index"
48
+ checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649"
49
+
50
+ [[package]]
51
+ name = "cc"
52
+ version = "1.2.65"
53
+ source = "registry+https://github.com/rust-lang/crates.io-index"
54
+ checksum = "e228eec9be7c17ccb640b59b36a5cd805ea2a564a4c5e162c2f659fea30d3b96"
55
+ dependencies = [
56
+ "find-msvc-tools",
57
+ "shlex",
58
+ ]
59
+
60
+ [[package]]
61
+ name = "cfg-if"
62
+ version = "1.0.4"
63
+ source = "registry+https://github.com/rust-lang/crates.io-index"
64
+ checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
65
+
66
+ [[package]]
67
+ name = "chrono"
68
+ version = "0.4.45"
69
+ source = "registry+https://github.com/rust-lang/crates.io-index"
70
+ checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327"
71
+ dependencies = [
72
+ "iana-time-zone",
73
+ "num-traits",
74
+ "windows-link",
75
+ ]
76
+
77
+ [[package]]
78
+ name = "core-foundation-sys"
79
+ version = "0.8.7"
80
+ source = "registry+https://github.com/rust-lang/crates.io-index"
81
+ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
82
+
83
+ [[package]]
84
+ name = "equivalent"
85
+ version = "1.0.2"
86
+ source = "registry+https://github.com/rust-lang/crates.io-index"
87
+ checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
88
+
89
+ [[package]]
90
+ name = "fancy-regex"
91
+ version = "0.14.0"
92
+ source = "registry+https://github.com/rust-lang/crates.io-index"
93
+ checksum = "6e24cb5a94bcae1e5408b0effca5cd7172ea3c5755049c5f3af4cd283a165298"
94
+ dependencies = [
95
+ "bit-set",
96
+ "regex-automata",
97
+ "regex-syntax",
98
+ ]
99
+
100
+ [[package]]
101
+ name = "find-msvc-tools"
102
+ version = "0.1.9"
103
+ source = "registry+https://github.com/rust-lang/crates.io-index"
104
+ checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582"
105
+
106
+ [[package]]
107
+ name = "futures-core"
108
+ version = "0.3.32"
109
+ source = "registry+https://github.com/rust-lang/crates.io-index"
110
+ checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d"
111
+
112
+ [[package]]
113
+ name = "futures-task"
114
+ version = "0.3.32"
115
+ source = "registry+https://github.com/rust-lang/crates.io-index"
116
+ checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393"
117
+
118
+ [[package]]
119
+ name = "futures-util"
120
+ version = "0.3.32"
121
+ source = "registry+https://github.com/rust-lang/crates.io-index"
122
+ checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6"
123
+ dependencies = [
124
+ "futures-core",
125
+ "futures-task",
126
+ "pin-project-lite",
127
+ "slab",
128
+ ]
129
+
130
+ [[package]]
131
+ name = "hashbrown"
132
+ version = "0.17.1"
133
+ source = "registry+https://github.com/rust-lang/crates.io-index"
134
+ checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a"
135
+
136
+ [[package]]
137
+ name = "heck"
138
+ version = "0.5.0"
139
+ source = "registry+https://github.com/rust-lang/crates.io-index"
140
+ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
141
+
142
+ [[package]]
143
+ name = "iana-time-zone"
144
+ version = "0.1.65"
145
+ source = "registry+https://github.com/rust-lang/crates.io-index"
146
+ checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470"
147
+ dependencies = [
148
+ "android_system_properties",
149
+ "core-foundation-sys",
150
+ "iana-time-zone-haiku",
151
+ "js-sys",
152
+ "log",
153
+ "wasm-bindgen",
154
+ "windows-core",
155
+ ]
156
+
157
+ [[package]]
158
+ name = "iana-time-zone-haiku"
159
+ version = "0.1.2"
160
+ source = "registry+https://github.com/rust-lang/crates.io-index"
161
+ checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
162
+ dependencies = [
163
+ "cc",
164
+ ]
165
+
166
+ [[package]]
167
+ name = "indexmap"
168
+ version = "2.14.0"
169
+ source = "registry+https://github.com/rust-lang/crates.io-index"
170
+ checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9"
171
+ dependencies = [
172
+ "equivalent",
173
+ "hashbrown",
174
+ ]
175
+
176
+ [[package]]
177
+ name = "indoc"
178
+ version = "2.0.7"
179
+ source = "registry+https://github.com/rust-lang/crates.io-index"
180
+ checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706"
181
+ dependencies = [
182
+ "rustversion",
183
+ ]
184
+
185
+ [[package]]
186
+ name = "js-sys"
187
+ version = "0.3.103"
188
+ source = "registry+https://github.com/rust-lang/crates.io-index"
189
+ checksum = "53b44bfcdb3f8d5837a46dae1ca9660a837176eee74a28b229bc626816589102"
190
+ dependencies = [
191
+ "cfg-if",
192
+ "futures-util",
193
+ "wasm-bindgen",
194
+ ]
195
+
196
+ [[package]]
197
+ name = "jsonata"
198
+ version = "0.1.0"
199
+ dependencies = [
200
+ "chrono",
201
+ "fancy-regex",
202
+ "indexmap",
203
+ "regex",
204
+ ]
205
+
206
+ [[package]]
207
+ name = "jsonata-py"
208
+ version = "0.1.0"
209
+ dependencies = [
210
+ "jsonata",
211
+ "pyo3",
212
+ ]
213
+
214
+ [[package]]
215
+ name = "libc"
216
+ version = "0.2.186"
217
+ source = "registry+https://github.com/rust-lang/crates.io-index"
218
+ checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66"
219
+
220
+ [[package]]
221
+ name = "log"
222
+ version = "0.4.33"
223
+ source = "registry+https://github.com/rust-lang/crates.io-index"
224
+ checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad"
225
+
226
+ [[package]]
227
+ name = "memchr"
228
+ version = "2.8.2"
229
+ source = "registry+https://github.com/rust-lang/crates.io-index"
230
+ checksum = "88904434abc2901f197fe8cc55f0445e7ded921dba5911dad2e2b39b48e663c4"
231
+
232
+ [[package]]
233
+ name = "memoffset"
234
+ version = "0.9.1"
235
+ source = "registry+https://github.com/rust-lang/crates.io-index"
236
+ checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
237
+ dependencies = [
238
+ "autocfg",
239
+ ]
240
+
241
+ [[package]]
242
+ name = "num-traits"
243
+ version = "0.2.19"
244
+ source = "registry+https://github.com/rust-lang/crates.io-index"
245
+ checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
246
+ dependencies = [
247
+ "autocfg",
248
+ ]
249
+
250
+ [[package]]
251
+ name = "once_cell"
252
+ version = "1.21.4"
253
+ source = "registry+https://github.com/rust-lang/crates.io-index"
254
+ checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
255
+
256
+ [[package]]
257
+ name = "pin-project-lite"
258
+ version = "0.2.17"
259
+ source = "registry+https://github.com/rust-lang/crates.io-index"
260
+ checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"
261
+
262
+ [[package]]
263
+ name = "portable-atomic"
264
+ version = "1.13.1"
265
+ source = "registry+https://github.com/rust-lang/crates.io-index"
266
+ checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49"
267
+
268
+ [[package]]
269
+ name = "proc-macro2"
270
+ version = "1.0.106"
271
+ source = "registry+https://github.com/rust-lang/crates.io-index"
272
+ checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
273
+ dependencies = [
274
+ "unicode-ident",
275
+ ]
276
+
277
+ [[package]]
278
+ name = "pyo3"
279
+ version = "0.23.5"
280
+ source = "registry+https://github.com/rust-lang/crates.io-index"
281
+ checksum = "7778bffd85cf38175ac1f545509665d0b9b92a198ca7941f131f85f7a4f9a872"
282
+ dependencies = [
283
+ "cfg-if",
284
+ "indoc",
285
+ "libc",
286
+ "memoffset",
287
+ "once_cell",
288
+ "portable-atomic",
289
+ "pyo3-build-config",
290
+ "pyo3-ffi",
291
+ "pyo3-macros",
292
+ "unindent",
293
+ ]
294
+
295
+ [[package]]
296
+ name = "pyo3-build-config"
297
+ version = "0.23.5"
298
+ source = "registry+https://github.com/rust-lang/crates.io-index"
299
+ checksum = "94f6cbe86ef3bf18998d9df6e0f3fc1050a8c5efa409bf712e661a4366e010fb"
300
+ dependencies = [
301
+ "once_cell",
302
+ "target-lexicon",
303
+ ]
304
+
305
+ [[package]]
306
+ name = "pyo3-ffi"
307
+ version = "0.23.5"
308
+ source = "registry+https://github.com/rust-lang/crates.io-index"
309
+ checksum = "e9f1b4c431c0bb1c8fb0a338709859eed0d030ff6daa34368d3b152a63dfdd8d"
310
+ dependencies = [
311
+ "libc",
312
+ "pyo3-build-config",
313
+ ]
314
+
315
+ [[package]]
316
+ name = "pyo3-macros"
317
+ version = "0.23.5"
318
+ source = "registry+https://github.com/rust-lang/crates.io-index"
319
+ checksum = "fbc2201328f63c4710f68abdf653c89d8dbc2858b88c5d88b0ff38a75288a9da"
320
+ dependencies = [
321
+ "proc-macro2",
322
+ "pyo3-macros-backend",
323
+ "quote",
324
+ "syn",
325
+ ]
326
+
327
+ [[package]]
328
+ name = "pyo3-macros-backend"
329
+ version = "0.23.5"
330
+ source = "registry+https://github.com/rust-lang/crates.io-index"
331
+ checksum = "fca6726ad0f3da9c9de093d6f116a93c1a38e417ed73bf138472cf4064f72028"
332
+ dependencies = [
333
+ "heck",
334
+ "proc-macro2",
335
+ "pyo3-build-config",
336
+ "quote",
337
+ "syn",
338
+ ]
339
+
340
+ [[package]]
341
+ name = "quote"
342
+ version = "1.0.46"
343
+ source = "registry+https://github.com/rust-lang/crates.io-index"
344
+ checksum = "dfbc457d0c7a0759a614551b11a6409e5951f6c7537be1f1b7682b9ae9230368"
345
+ dependencies = [
346
+ "proc-macro2",
347
+ ]
348
+
349
+ [[package]]
350
+ name = "regex"
351
+ version = "1.12.4"
352
+ source = "registry+https://github.com/rust-lang/crates.io-index"
353
+ checksum = "f1292b7759ae1cb9ec195452d1390a074f0cd8541ab7a5a8c31cd6db45d4a6ba"
354
+ dependencies = [
355
+ "aho-corasick",
356
+ "memchr",
357
+ "regex-automata",
358
+ "regex-syntax",
359
+ ]
360
+
361
+ [[package]]
362
+ name = "regex-automata"
363
+ version = "0.4.14"
364
+ source = "registry+https://github.com/rust-lang/crates.io-index"
365
+ checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f"
366
+ dependencies = [
367
+ "aho-corasick",
368
+ "memchr",
369
+ "regex-syntax",
370
+ ]
371
+
372
+ [[package]]
373
+ name = "regex-syntax"
374
+ version = "0.8.11"
375
+ source = "registry+https://github.com/rust-lang/crates.io-index"
376
+ checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4"
377
+
378
+ [[package]]
379
+ name = "rustversion"
380
+ version = "1.0.22"
381
+ source = "registry+https://github.com/rust-lang/crates.io-index"
382
+ checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
383
+
384
+ [[package]]
385
+ name = "shlex"
386
+ version = "2.0.1"
387
+ source = "registry+https://github.com/rust-lang/crates.io-index"
388
+ checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba"
389
+
390
+ [[package]]
391
+ name = "slab"
392
+ version = "0.4.12"
393
+ source = "registry+https://github.com/rust-lang/crates.io-index"
394
+ checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5"
395
+
396
+ [[package]]
397
+ name = "syn"
398
+ version = "2.0.118"
399
+ source = "registry+https://github.com/rust-lang/crates.io-index"
400
+ checksum = "1b9ae57f904213ebb649ce6895b8a66c66f0203b9319718f69a5612a065b1422"
401
+ dependencies = [
402
+ "proc-macro2",
403
+ "quote",
404
+ "unicode-ident",
405
+ ]
406
+
407
+ [[package]]
408
+ name = "target-lexicon"
409
+ version = "0.12.16"
410
+ source = "registry+https://github.com/rust-lang/crates.io-index"
411
+ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
412
+
413
+ [[package]]
414
+ name = "unicode-ident"
415
+ version = "1.0.24"
416
+ source = "registry+https://github.com/rust-lang/crates.io-index"
417
+ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
418
+
419
+ [[package]]
420
+ name = "unindent"
421
+ version = "0.2.4"
422
+ source = "registry+https://github.com/rust-lang/crates.io-index"
423
+ checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3"
424
+
425
+ [[package]]
426
+ name = "wasm-bindgen"
427
+ version = "0.2.126"
428
+ source = "registry+https://github.com/rust-lang/crates.io-index"
429
+ checksum = "4b067c0c11094aef6b7a801c1e34a26affafdf3d051dba08456b868789aaf9a4"
430
+ dependencies = [
431
+ "cfg-if",
432
+ "once_cell",
433
+ "rustversion",
434
+ "wasm-bindgen-macro",
435
+ "wasm-bindgen-shared",
436
+ ]
437
+
438
+ [[package]]
439
+ name = "wasm-bindgen-macro"
440
+ version = "0.2.126"
441
+ source = "registry+https://github.com/rust-lang/crates.io-index"
442
+ checksum = "167ce5e579f6bcf889c4f7175a8a5a585de84e8ff93976ce393efa5f2837aab1"
443
+ dependencies = [
444
+ "quote",
445
+ "wasm-bindgen-macro-support",
446
+ ]
447
+
448
+ [[package]]
449
+ name = "wasm-bindgen-macro-support"
450
+ version = "0.2.126"
451
+ source = "registry+https://github.com/rust-lang/crates.io-index"
452
+ checksum = "f3997c7839262f4ef12cf90b818d6340c18e80f263f1a94bf157d0ec4420380e"
453
+ dependencies = [
454
+ "bumpalo",
455
+ "proc-macro2",
456
+ "quote",
457
+ "syn",
458
+ "wasm-bindgen-shared",
459
+ ]
460
+
461
+ [[package]]
462
+ name = "wasm-bindgen-shared"
463
+ version = "0.2.126"
464
+ source = "registry+https://github.com/rust-lang/crates.io-index"
465
+ checksum = "dc1b4cb0cc549fcf58d7dfc081778139b3d283a081644e833e84682ad71cea24"
466
+ dependencies = [
467
+ "unicode-ident",
468
+ ]
469
+
470
+ [[package]]
471
+ name = "windows-core"
472
+ version = "0.62.2"
473
+ source = "registry+https://github.com/rust-lang/crates.io-index"
474
+ checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb"
475
+ dependencies = [
476
+ "windows-implement",
477
+ "windows-interface",
478
+ "windows-link",
479
+ "windows-result",
480
+ "windows-strings",
481
+ ]
482
+
483
+ [[package]]
484
+ name = "windows-implement"
485
+ version = "0.60.2"
486
+ source = "registry+https://github.com/rust-lang/crates.io-index"
487
+ checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf"
488
+ dependencies = [
489
+ "proc-macro2",
490
+ "quote",
491
+ "syn",
492
+ ]
493
+
494
+ [[package]]
495
+ name = "windows-interface"
496
+ version = "0.59.3"
497
+ source = "registry+https://github.com/rust-lang/crates.io-index"
498
+ checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358"
499
+ dependencies = [
500
+ "proc-macro2",
501
+ "quote",
502
+ "syn",
503
+ ]
504
+
505
+ [[package]]
506
+ name = "windows-link"
507
+ version = "0.2.1"
508
+ source = "registry+https://github.com/rust-lang/crates.io-index"
509
+ checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
510
+
511
+ [[package]]
512
+ name = "windows-result"
513
+ version = "0.4.1"
514
+ source = "registry+https://github.com/rust-lang/crates.io-index"
515
+ checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5"
516
+ dependencies = [
517
+ "windows-link",
518
+ ]
519
+
520
+ [[package]]
521
+ name = "windows-strings"
522
+ version = "0.5.1"
523
+ source = "registry+https://github.com/rust-lang/crates.io-index"
524
+ checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091"
525
+ dependencies = [
526
+ "windows-link",
527
+ ]
@@ -0,0 +1,11 @@
1
+ [workspace]
2
+ members = ["crates/jsonata", "crates/jsonata-py"]
3
+ resolver = "2"
4
+
5
+ [workspace.package]
6
+ version = "0.1.0"
7
+ edition = "2021"
8
+ license = "Apache-2.0"
9
+
10
+ [profile.release]
11
+ opt-level = 3
@@ -0,0 +1,65 @@
1
+ Metadata-Version: 2.4
2
+ Name: jsonata-rs
3
+ Version: 0.1.0
4
+ Classifier: Programming Language :: Rust
5
+ Classifier: Programming Language :: Python :: Implementation :: CPython
6
+ Summary: JSONata for Python — Rust port of the jsonata-java reference implementation
7
+ License: Apache-2.0
8
+ Requires-Python: >=3.11
9
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
10
+
11
+ # jsonata-rs
12
+
13
+ Python bindings for the Rust port of [jsonata-java](https://github.com/dashjoin/jsonata-java).
14
+
15
+ * PyPI distribution name: **`jsonata-rs`** — `pip install jsonata-rs`
16
+ * Import name: **`jsonata`** — `import jsonata`
17
+ * Requires **Python ≥ 3.11**; published as a single `abi3` wheel per platform
18
+ (Linux amd64 + arm64, macOS arm64).
19
+
20
+ ```python
21
+ import jsonata
22
+
23
+ expr = jsonata.Jsonata("Account.Order.Product.(Price * Quantity) ~> $sum()")
24
+ expr.evaluate(data) # evaluate against a dict / list / scalar
25
+
26
+ # variable bindings
27
+ jsonata.Jsonata("$x + 1").evaluate(None, {"x": 41}) # -> 42
28
+
29
+ # one-shot convenience
30
+ jsonata.evaluate("a + b", {"a": 2, "b": 3}) # -> 5
31
+
32
+ # custom functions written in Python
33
+ e = jsonata.Jsonata("$greet(name)")
34
+ e.register_function("greet", lambda n: f"Hello, {n}!")
35
+ e.evaluate({"name": "World"}) # -> "Hello, World!"
36
+ ```
37
+
38
+ Errors raise `jsonata.JsonataError` with `.code` (e.g. `"S0201"`) and `.position`.
39
+
40
+ ## Value mapping
41
+
42
+ | JSONata | Python |
43
+ |----------------|-------------------|
44
+ | number | `int` (whole) / `float` |
45
+ | string | `str` |
46
+ | boolean | `bool` |
47
+ | null | `None` |
48
+ | undefined | `None` |
49
+ | array | `list` |
50
+ | object | `dict` |
51
+
52
+ ## Building
53
+
54
+ ```sh
55
+ pip install maturin
56
+ maturin build --release -m crates/jsonata-py/Cargo.toml # wheel in target/wheels/
57
+ # or for local dev:
58
+ maturin develop --release -m crates/jsonata-py/Cargo.toml
59
+ ```
60
+
61
+ CI (`.github/workflows/CI.yml`) cross-builds wheels for amd64 + arm64 across
62
+ Linux (manylinux + musllinux) and macOS with `PyO3/maturin-action`, and
63
+ publishes to PyPI with `pypa/gh-action-pypi-publish` (Trusted Publishing) on tag
64
+ pushes.
65
+
@@ -0,0 +1,54 @@
1
+ # jsonata-rs
2
+
3
+ Python bindings for the Rust port of [jsonata-java](https://github.com/dashjoin/jsonata-java).
4
+
5
+ * PyPI distribution name: **`jsonata-rs`** — `pip install jsonata-rs`
6
+ * Import name: **`jsonata`** — `import jsonata`
7
+ * Requires **Python ≥ 3.11**; published as a single `abi3` wheel per platform
8
+ (Linux amd64 + arm64, macOS arm64).
9
+
10
+ ```python
11
+ import jsonata
12
+
13
+ expr = jsonata.Jsonata("Account.Order.Product.(Price * Quantity) ~> $sum()")
14
+ expr.evaluate(data) # evaluate against a dict / list / scalar
15
+
16
+ # variable bindings
17
+ jsonata.Jsonata("$x + 1").evaluate(None, {"x": 41}) # -> 42
18
+
19
+ # one-shot convenience
20
+ jsonata.evaluate("a + b", {"a": 2, "b": 3}) # -> 5
21
+
22
+ # custom functions written in Python
23
+ e = jsonata.Jsonata("$greet(name)")
24
+ e.register_function("greet", lambda n: f"Hello, {n}!")
25
+ e.evaluate({"name": "World"}) # -> "Hello, World!"
26
+ ```
27
+
28
+ Errors raise `jsonata.JsonataError` with `.code` (e.g. `"S0201"`) and `.position`.
29
+
30
+ ## Value mapping
31
+
32
+ | JSONata | Python |
33
+ |----------------|-------------------|
34
+ | number | `int` (whole) / `float` |
35
+ | string | `str` |
36
+ | boolean | `bool` |
37
+ | null | `None` |
38
+ | undefined | `None` |
39
+ | array | `list` |
40
+ | object | `dict` |
41
+
42
+ ## Building
43
+
44
+ ```sh
45
+ pip install maturin
46
+ maturin build --release -m crates/jsonata-py/Cargo.toml # wheel in target/wheels/
47
+ # or for local dev:
48
+ maturin develop --release -m crates/jsonata-py/Cargo.toml
49
+ ```
50
+
51
+ CI (`.github/workflows/CI.yml`) cross-builds wheels for amd64 + arm64 across
52
+ Linux (manylinux + musllinux) and macOS with `PyO3/maturin-action`, and
53
+ publishes to PyPI with `pypa/gh-action-pypi-publish` (Trusted Publishing) on tag
54
+ pushes.
@@ -0,0 +1,14 @@
1
+ [package]
2
+ name = "jsonata"
3
+ version.workspace = true
4
+ edition.workspace = true
5
+ license.workspace = true
6
+ description = "JSONata reference port to Rust (ported from jsonata-java)"
7
+
8
+ [dependencies]
9
+ indexmap = "2"
10
+ regex = "1"
11
+ fancy-regex = "0.14"
12
+ chrono = { version = "0.4", default-features = false, features = ["clock", "std"] }
13
+
14
+ [dev-dependencies]