json-eval-rs 0.0.116

High-performance JSON Logic evaluator with schema validation and dependency tracking. Built on blazing-fast Rust engine.
Documentation
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
// JSONEval subform helper methods only.
using System;
using System.Runtime.InteropServices;
using System.Text;
using System.Collections.Generic;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;

namespace JsonEvalRs
{
    /// <summary>
    /// Subform methods for JSONEval class
    /// </summary>
    public partial class JSONEval
    {
        // ============================================================================
        // Subform Methods
        // ============================================================================

        /// <summary>
        /// Evaluate a subform with data
        /// </summary>
        /// <param name="subformPath">Path to the subform</param>
        /// <param name="data">JSON data string for the subform</param>
        /// <param name="context">Optional context data JSON string</param>
        /// <param name="paths">Optional list of paths for selective evaluation</param>
        public void EvaluateSubform(string subformPath, string data, string? context = null, IEnumerable<string>? paths = null)
        {
            ThrowIfDisposed();
            if (string.IsNullOrEmpty(subformPath))
                throw new ArgumentNullException(nameof(subformPath));
            if (string.IsNullOrEmpty(data))
                throw new ArgumentNullException(nameof(data));

            string? pathsJson = paths != null ? JsonConvert.SerializeObject(paths) : null;

#if NETCOREAPP || NET5_0_OR_GREATER
            var result = Native.json_eval_evaluate_subform(_handle, subformPath, data, context, pathsJson);
#else
            var result = Native.json_eval_evaluate_subform(_handle, Native.ToUTF8Bytes(subformPath)!, Native.ToUTF8Bytes(data)!, Native.ToUTF8Bytes(context), Native.ToUTF8Bytes(pathsJson));
#endif
            
            if (!result.Success)
            {
#if NETCOREAPP || NET5_0_OR_GREATER
                string error = result.Error != IntPtr.Zero
                    ? Marshal.PtrToStringUTF8(result.Error) ?? "Unknown error"
                    : "Unknown error";
#else
                string error = result.Error != IntPtr.Zero
                    ? Native.PtrToStringUTF8(result.Error) ?? "Unknown error"
                    : "Unknown error";
#endif
                Native.json_eval_free_result(result);
                throw new JsonEvalException(error);
            }
            
            Native.json_eval_free_result(result);
        }

        /// <summary>
        /// Validate subform data against its schema rules
        /// </summary>
        /// <param name="subformPath">Path to the subform</param>
        /// <param name="data">JSON data string for the subform</param>
        /// <param name="context">Optional context data JSON string</param>
        /// <returns>Validation result with errors if any</returns>
        public ValidationResult ValidateSubform(string subformPath, string data, string? context = null)
        {
            ThrowIfDisposed();
            if (string.IsNullOrEmpty(subformPath))
                throw new ArgumentNullException(nameof(subformPath));
            if (string.IsNullOrEmpty(data))
                throw new ArgumentNullException(nameof(data));

#if NETCOREAPP || NET5_0_OR_GREATER
            var result = Native.json_eval_validate_subform(_handle, subformPath, data, context);
#else
            var result = Native.json_eval_validate_subform(_handle, Native.ToUTF8Bytes(subformPath)!, Native.ToUTF8Bytes(data)!, Native.ToUTF8Bytes(context));
#endif
            
            return ProcessResult<ValidationResult>(result);
        }

        /// <summary>
        /// Evaluate dependents in subform when a field changes
        /// </summary>
        /// <param name="subformPath">Path to the subform</param>
        /// <param name="changedPath">Path of the field that changed</param>
        /// <param name="data">Optional updated JSON data string</param>
        /// <param name="context">Optional context data JSON string</param>
        /// <returns>Array of dependent change objects</returns>
        public JArray EvaluateDependentsSubform(string subformPath, string changedPath, string? data = null, string? context = null, bool reEvaluate = true, bool includeSubforms = true)
        {
            ThrowIfDisposed();
            if (string.IsNullOrEmpty(subformPath))
                throw new ArgumentNullException(nameof(subformPath));
            if (string.IsNullOrEmpty(changedPath))
                throw new ArgumentNullException(nameof(changedPath));

#if NETCOREAPP || NET5_0_OR_GREATER
            var result = Native.json_eval_evaluate_dependents_subform(_handle, subformPath, changedPath, data, context, reEvaluate ? 1 : 0, includeSubforms ? 1 : 0);
#else
            var result = Native.json_eval_evaluate_dependents_subform(_handle, Native.ToUTF8Bytes(subformPath)!, Native.ToUTF8Bytes(changedPath)!, Native.ToUTF8Bytes(data), Native.ToUTF8Bytes(context), reEvaluate ? 1 : 0, includeSubforms ? 1 : 0);
#endif
            
            return ProcessResultAsArray(result);
        }

        /// <summary>
        /// Evaluate dependents in subform when a field changes
        /// </summary>
        /// <param name="subformPath">Path to the subform</param>
        /// <param name="changedPath">Path of the field that changed</param>
        /// <param name="data">Optional updated JSON data string</param>
        /// <param name="context">Optional context data JSON string</param>
        /// <returns>JSON string containing array of dependent change objects</returns>
        public string EvaluateDependentsSubformString(string subformPath, string changedPath, string? data = null, string? context = null, bool reEvaluate = true, bool includeSubforms = true)
        {
            ThrowIfDisposed();
            if (string.IsNullOrEmpty(subformPath))
                throw new ArgumentNullException(nameof(subformPath));
            if (string.IsNullOrEmpty(changedPath))
                throw new ArgumentNullException(nameof(changedPath));

#if NETCOREAPP || NET5_0_OR_GREATER
            var result = Native.json_eval_evaluate_dependents_subform(_handle, subformPath, changedPath, data, context, reEvaluate ? 1 : 0, includeSubforms ? 1 : 0);
#else
            var result = Native.json_eval_evaluate_dependents_subform(_handle, Native.ToUTF8Bytes(subformPath)!, Native.ToUTF8Bytes(changedPath)!, Native.ToUTF8Bytes(data), Native.ToUTF8Bytes(context), reEvaluate ? 1 : 0, includeSubforms ? 1 : 0);
#endif
            
            return ProcessResultAsString(result);
        }

        /// <summary>
        /// Resolve layout for subform, returning overlay entries
        /// </summary>
        /// <param name="subformPath">Path to the subform</param>
        /// <param name="evaluate">If true, runs evaluation before resolving layout</param>
        /// <returns>LayoutOverlayEntry array as JArray</returns>
        public JArray ResolveLayoutSubform(string subformPath, bool evaluate = false)
        {
            ThrowIfDisposed();
            if (string.IsNullOrEmpty(subformPath))
                throw new ArgumentNullException(nameof(subformPath));

#if NETCOREAPP || NET5_0_OR_GREATER
            var result = Native.json_eval_resolve_layout_subform(_handle, subformPath, evaluate);
#else
            var result = Native.json_eval_resolve_layout_subform(_handle, Native.ToUTF8Bytes(subformPath)!, evaluate);
#endif
            
            return ProcessResultAsArray(result);
        }

        /// <summary>
        /// Get evaluated schema from subform (compact, no $layout resolution)
        /// </summary>
        /// <param name="subformPath">Path to the subform</param>
        /// <returns>Evaluated schema as JObject</returns>
        public JObject GetEvaluatedSchemaSubform(string subformPath)
        {
            ThrowIfDisposed();
            if (string.IsNullOrEmpty(subformPath))
                throw new ArgumentNullException(nameof(subformPath));

#if NETCOREAPP || NET5_0_OR_GREATER
            var result = Native.json_eval_get_evaluated_schema_subform(_handle, subformPath);
#else
            var result = Native.json_eval_get_evaluated_schema_subform(_handle, Native.ToUTF8Bytes(subformPath)!);
#endif
            
            return ProcessResult(result);
        }

        /// <summary>
        /// Get resolved layout overlay entries for subform
        /// </summary>
        /// <param name="subformPath">Path to the subform</param>
        /// <returns>Layout overlay as JArray</returns>
        public JArray GetResolvedLayoutSubform(string subformPath)
        {
            ThrowIfDisposed();
            if (string.IsNullOrEmpty(subformPath))
                throw new ArgumentNullException(nameof(subformPath));

#if NETCOREAPP || NET5_0_OR_GREATER
            var result = Native.json_eval_get_resolved_layout_subform(_handle, subformPath);
#else
            var result = Native.json_eval_get_resolved_layout_subform(_handle, Native.ToUTF8Bytes(subformPath)!);
#endif
            
            return ProcessResultAsArray(result);
        }

        /// <summary>
        /// Get evaluated schema with layout fully resolved for subform
        /// </summary>
        /// <param name="subformPath">Path to the subform</param>
        /// <returns>Evaluated schema with resolved layout as JObject</returns>
        public JObject GetEvaluatedSchemaResolvedSubform(string subformPath)
        {
            ThrowIfDisposed();
            if (string.IsNullOrEmpty(subformPath))
                throw new ArgumentNullException(nameof(subformPath));

            return LayoutOverlayMerger.Merge(
                GetEvaluatedSchemaWithoutParamsSubform(subformPath),
                GetResolvedLayoutSubform(subformPath));
        }

        /// <summary>
        /// Get schema value from subform in nested object format (all .value fields).
        /// Returns a hierarchical object structure mimicking the schema.
        /// </summary>
        /// <param name="subformPath">Path to the subform</param>
        /// <returns>Modified data as JObject (Nested)</returns>
        public JObject GetSchemaValueSubform(string subformPath)
        {
            ThrowIfDisposed();
            if (string.IsNullOrEmpty(subformPath))
                throw new ArgumentNullException(nameof(subformPath));

#if NETCOREAPP || NET5_0_OR_GREATER
            var result = Native.json_eval_get_schema_value_subform(_handle, subformPath);
#else
            var result = Native.json_eval_get_schema_value_subform(_handle, Native.ToUTF8Bytes(subformPath)!);
#endif
            
            return ProcessResult(result);
        }

        /// <summary>
        /// Get schema values from subform as a flat array of path-value pairs.
        /// Returns an array like `[{path: "field.sub", value: 123}, ...]`.
        /// </summary>
        /// <param name="subformPath">Path to the subform</param>
        /// <returns>Array of SchemaValueItem objects</returns>
        public JArray GetSchemaValueArraySubform(string subformPath)
        {
            ThrowIfDisposed();
            if (string.IsNullOrEmpty(subformPath))
                throw new ArgumentNullException(nameof(subformPath));

#if NETCOREAPP || NET5_0_OR_GREATER
            var result = Native.json_eval_get_schema_value_array_subform(_handle, subformPath);
#else
            var result = Native.json_eval_get_schema_value_array_subform(_handle, Native.ToUTF8Bytes(subformPath)!);
#endif
            
            return ProcessResultAsArray(result);
        }

        /// <summary>
        /// Get schema values from subform as a flat object with dotted path keys.
        /// Returns an object like `{"field.sub": 123, ...}`.
        /// </summary>
        /// <param name="subformPath">Path to the subform</param>
        /// <returns>Flat JObject with dotted paths as keys</returns>
        public JObject GetSchemaValueObjectSubform(string subformPath)
        {
            ThrowIfDisposed();
            if (string.IsNullOrEmpty(subformPath))
                throw new ArgumentNullException(nameof(subformPath));

#if NETCOREAPP || NET5_0_OR_GREATER
            var result = Native.json_eval_get_schema_value_object_subform(_handle, subformPath);
#else
            var result = Native.json_eval_get_schema_value_object_subform(_handle, Native.ToUTF8Bytes(subformPath)!);
#endif
            
            return ProcessResult(result);
        }

        /// <summary>
        /// Get evaluated schema without $params from subform (compact)
        /// </summary>
        /// <param name="subformPath">Path to the subform</param>
        /// <returns>Evaluated schema as JObject</returns>
        public JObject GetEvaluatedSchemaWithoutParamsSubform(string subformPath)
        {
            ThrowIfDisposed();
            if (string.IsNullOrEmpty(subformPath))
                throw new ArgumentNullException(nameof(subformPath));

#if NETCOREAPP || NET5_0_OR_GREATER
            var result = Native.json_eval_get_evaluated_schema_without_params_subform(_handle, subformPath);
#else
            var result = Native.json_eval_get_evaluated_schema_without_params_subform(_handle, Native.ToUTF8Bytes(subformPath)!);
#endif
            
            return ProcessResult(result);
        }

        /// <summary>
        /// Get evaluated schema by specific path from subform (compact)
        /// </summary>
        /// <param name="subformPath">Path to the subform</param>
        /// <param name="schemaPath">Dotted path to the value within the subform</param>
        /// <returns>Value as JObject or null if not found</returns>
        public JObject? GetEvaluatedSchemaByPathSubform(string subformPath, string schemaPath)
        {
            ThrowIfDisposed();
            if (string.IsNullOrEmpty(subformPath))
                throw new ArgumentNullException(nameof(subformPath));
            if (string.IsNullOrEmpty(schemaPath))
                throw new ArgumentNullException(nameof(schemaPath));

#if NETCOREAPP || NET5_0_OR_GREATER
            var result = Native.json_eval_get_evaluated_schema_by_path_subform(_handle, subformPath, schemaPath);
#else
            var result = Native.json_eval_get_evaluated_schema_by_path_subform(_handle, Native.ToUTF8Bytes(subformPath)!, Native.ToUTF8Bytes(schemaPath)!);
#endif
            
            try
            {
                if (!result.Success)
                {
                    // Path not found - return null
                    return null;
                }

                if (result.DataPtr == IntPtr.Zero)
                    return null;

                int dataLen = (int)result.DataLen.ToUInt32();
                if (dataLen == 0)
                    return null;

                byte[] buffer = new byte[dataLen];
                Marshal.Copy(result.DataPtr, buffer, 0, dataLen);
                
                string json = Encoding.UTF8.GetString(buffer);
                return JObject.Parse(json);
            }
            finally
            {
                Native.json_eval_free_result(result);
            }
        }

        /// <summary>
        /// Gets evaluated schema values by multiple paths from subform (compact)
        /// Returns data in the specified format. Skips paths that are not found.
        /// </summary>
        /// <param name="subformPath">Path to the subform</param>
        /// <param name="schemaPaths">Array of dotted paths to retrieve within the subform</param>
        /// <param name="format">Return format: Nested (default), Flat, or Array</param>
        /// <returns>Data in the specified format (JObject for Nested/Flat, JArray for Array)</returns>
        public JToken GetEvaluatedSchemaByPathsSubform(string subformPath, string[] schemaPaths, ReturnFormat format = ReturnFormat.Nested)
        {
            ThrowIfDisposed();
            if (string.IsNullOrEmpty(subformPath))
                throw new ArgumentNullException(nameof(subformPath));
            if (schemaPaths == null || schemaPaths.Length == 0)
                throw new ArgumentNullException(nameof(schemaPaths));

            string pathsJson = JsonConvert.SerializeObject(schemaPaths);

#if NETCOREAPP || NET5_0_OR_GREATER
            var result = Native.json_eval_get_evaluated_schema_by_paths_subform(_handle, subformPath, pathsJson, (byte)format);
#else
            var result = Native.json_eval_get_evaluated_schema_by_paths_subform(_handle, Native.ToUTF8Bytes(subformPath)!, Native.ToUTF8Bytes(pathsJson)!, (byte)format);
#endif
            
            if (!result.Success)
            {
#if NETCOREAPP || NET5_0_OR_GREATER
                string error = result.Error != IntPtr.Zero
                    ? Marshal.PtrToStringUTF8(result.Error) ?? "Unknown error"
                    : "Unknown error";
#else
                string error = result.Error != IntPtr.Zero
                    ? Native.PtrToStringUTF8(result.Error) ?? "Unknown error"
                    : "Unknown error";
#endif
                Native.json_eval_free_result(result);
                throw new InvalidOperationException($"Failed to get evaluated schema by paths from subform: {error}");
            }

            try
            {
                if (result.DataPtr == IntPtr.Zero)
                    return format == ReturnFormat.Array ? (JToken)new JArray() : (JToken)new JObject();

                int dataLen = (int)result.DataLen.ToUInt32();
                if (dataLen == 0)
                    return format == ReturnFormat.Array ? (JToken)new JArray() : (JToken)new JObject();

                byte[] buffer = new byte[dataLen];
                Marshal.Copy(result.DataPtr, buffer, 0, dataLen);
                
                string json = Encoding.UTF8.GetString(buffer);
                return format == ReturnFormat.Array ? (JToken)JArray.Parse(json) : (JToken)JObject.Parse(json);
            }
            finally
            {
                Native.json_eval_free_result(result);
            }
        }

        /// <summary>
        /// Get list of available subform paths
        /// </summary>
        /// <returns>Array of subform paths</returns>
        public List<string> GetSubformPaths()
        {
            ThrowIfDisposed();
            var result = Native.json_eval_get_subform_paths(_handle);
            var array = ProcessResultAsArray(result);
            return array.ToObject<List<string>>() ?? new List<string>();
        }

        /// <summary>
        /// Check if a subform exists at the given path
        /// </summary>
        /// <param name="subformPath">Path to check</param>
        /// <returns>True if subform exists, false otherwise</returns>
        public bool HasSubform(string subformPath)
        {
            ThrowIfDisposed();
            if (string.IsNullOrEmpty(subformPath))
                throw new ArgumentNullException(nameof(subformPath));

#if NETCOREAPP || NET5_0_OR_GREATER
            var result = Native.json_eval_has_subform(_handle, subformPath);
#else
            var result = Native.json_eval_has_subform(_handle, Native.ToUTF8Bytes(subformPath)!);
#endif
            
            try
            {
                if (!result.Success)
                    return false;

                if (result.DataPtr == IntPtr.Zero)
                    return false;

                int dataLen = (int)result.DataLen.ToUInt32();
                if (dataLen == 0)
                    return false;

                byte[] buffer = new byte[dataLen];
                Marshal.Copy(result.DataPtr, buffer, 0, dataLen);
                string value = Encoding.UTF8.GetString(buffer);
                
                return value == "true";
            }
            finally
            {
                Native.json_eval_free_result(result);
            }
        }

        /// <summary>
        /// Gets schema value by specific path from subform
        /// </summary>
        /// <param name="subformPath">Path to the subform</param>
        /// <param name="schemaPath">Dotted path to the value within the subform</param>
        /// <returns>Value as JObject or null if not found</returns>
        public JObject? GetSchemaByPathSubform(string subformPath, string schemaPath)
        {
            ThrowIfDisposed();
            if (string.IsNullOrEmpty(subformPath))
                throw new ArgumentNullException(nameof(subformPath));
            if (string.IsNullOrEmpty(schemaPath))
                throw new ArgumentNullException(nameof(schemaPath));

#if NETCOREAPP || NET5_0_OR_GREATER
            var result = Native.json_eval_get_schema_by_path_subform(_handle, subformPath, schemaPath);
#else
            var result = Native.json_eval_get_schema_by_path_subform(_handle, Native.ToUTF8Bytes(subformPath)!, Native.ToUTF8Bytes(schemaPath)!);
#endif
            
            try
            {
                if (!result.Success)
                {
                    // Path not found - return null
                    return null;
                }

                if (result.DataPtr == IntPtr.Zero)
                    return null;

                int dataLen = (int)result.DataLen.ToUInt32();
                if (dataLen == 0)
                    return null;

                byte[] buffer = new byte[dataLen];
                Marshal.Copy(result.DataPtr, buffer, 0, dataLen);
                
                string json = Encoding.UTF8.GetString(buffer);
                return JObject.Parse(json);
            }
            finally
            {
                Native.json_eval_free_result(result);
            }
        }

        /// <summary>
        /// Gets schema values by multiple paths from subform
        /// Returns data in the specified format. Skips paths that are not found.
        /// </summary>
        /// <param name="subformPath">Path to the subform</param>
        /// <param name="schemaPaths">Array of dotted paths to retrieve within the subform</param>
        /// <param name="format">Return format: Nested (default), Flat, or Array</param>
        /// <returns>Data in the specified format (JObject for Nested/Flat, JArray for Array)</returns>
        public JToken GetSchemaByPathsSubform(string subformPath, string[] schemaPaths, ReturnFormat format = ReturnFormat.Nested)
        {
            ThrowIfDisposed();
            if (string.IsNullOrEmpty(subformPath))
                throw new ArgumentNullException(nameof(subformPath));
            if (schemaPaths == null || schemaPaths.Length == 0)
                throw new ArgumentNullException(nameof(schemaPaths));

            string pathsJson = JsonConvert.SerializeObject(schemaPaths);

#if NETCOREAPP || NET5_0_OR_GREATER
            var result = Native.json_eval_get_schema_by_paths_subform(_handle, subformPath, pathsJson, (byte)format);
#else
            var result = Native.json_eval_get_schema_by_paths_subform(_handle, Native.ToUTF8Bytes(subformPath)!, Native.ToUTF8Bytes(pathsJson)!, (byte)format);
#endif
            
            if (!result.Success)
            {
#if NETCOREAPP || NET5_0_OR_GREATER
                string error = result.Error != IntPtr.Zero
                    ? Marshal.PtrToStringUTF8(result.Error) ?? "Unknown error"
                    : "Unknown error";
#else
                string error = result.Error != IntPtr.Zero
                    ? Native.PtrToStringUTF8(result.Error) ?? "Unknown error"
                    : "Unknown error";
#endif
                Native.json_eval_free_result(result);
                throw new InvalidOperationException($"Failed to get schema by paths from subform: {error}");
            }

            try
            {
                if (result.DataPtr == IntPtr.Zero)
                    return format == ReturnFormat.Array ? (JToken)new JArray() : (JToken)new JObject();

                int dataLen = (int)result.DataLen.ToUInt32();
                if (dataLen == 0)
                    return format == ReturnFormat.Array ? (JToken)new JArray() : (JToken)new JObject();

                byte[] buffer = new byte[dataLen];
                Marshal.Copy(result.DataPtr, buffer, 0, dataLen);
                
                string json = Encoding.UTF8.GetString(buffer);
                return format == ReturnFormat.Array ? (JToken)JArray.Parse(json) : (JToken)JObject.Parse(json);
            }
            finally
            {
                Native.json_eval_free_result(result);
            }
        }
    }
}