You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Get - Receives data structure, and key path to extract value from.
488
+
489
+
Set - Receives existing data structure, path to set, and data to set at that key.
450
490
451
491
Returns:
452
-
`value` - Pointer to original data structure containing key value, or just empty slice if nothing found or error
453
-
`dataType` - Can be: `NotExist`, `String`, `Number`, `Object`, `Array`, `Boolean` or `Null`
454
-
`offset` - Offset from provided data structure where key value ends. Used mostly internally, for example for `ArrayEach` helper.
455
-
`err` - If key not found or any other parsing issue it should return error. If key not found it also sets `dataType` to `NotExist`
492
+
`value` - modified byte array
493
+
`err` - On any parsing error
456
494
457
-
Accept multiple keys to specify path to JSON value (in case of quering nested structures).
458
-
If no keys provided it will try to extract closest JSON value (simple ones or object/array), useful for reading streams or arrays, see `ArrayEach` implementation.
Get - Receives data structure, and key path to extract value from.
635
+
636
+
Returns:
637
+
`value` - Pointer to original data structure containing key value, or just empty slice if nothing found or error
638
+
`dataType` - Can be: `NotExist`, `String`, `Number`, `Object`, `Array`, `Boolean` or `Null`
639
+
`offset` - Offset from provided data structure where key value ends. Used mostly internally, for example for `ArrayEach` helper.
640
+
`err` - If key not found or any other parsing issue it should return error. If key not found it also sets `dataType` to `NotExist`
535
641
536
-
value=data[offset:endOffset]
642
+
Accept multiple keys to specify path to JSON value (in case of quering nested structures).
643
+
If no keys provided it will try to extract closest JSON value (simple ones or object/array), useful for reading streams or arrays, see `ArrayEach` implementation.
0 commit comments