romshark / jscan

High performance JSON iterator & validator for Go
BSD 3-Clause "New" or "Revised" License
89 stars 7 forks source link

PR to #21 #23

Open flrdv opened 10 months ago

flrdv commented 10 months ago

renamed walker closure's named return value to exit instead of err, as considered in #21

flrdv commented 10 months ago

It would make sense to update the documentation as well by adding the following sentence where relevant:

If fn returns true, <FuncName> immediately stops and returns ErrorCodeCallback.

Should those be in docstrings or distributed across the code by itself?

romshark commented 10 months ago

Should those be in docstrings or distributed across the code by itself?

In the doc comments of the individual functions/methods, like:

// ScanOne calls fn for every encountered value including objects and arrays.
// When an object or array is encountered fn will also be called for each of its
// member and element values.
// If fn returns true, ScanOne immediately stops and returns ErrorCodeCallback.
//
// ...
flrdv commented 10 months ago

Any updates?