json-spanned-value

Track the origin of your json values for better error reporting! (by MaulingMonkey)

Json-spanned-value Alternatives

Similar projects and alternatives to json-spanned-value

  • rust

    Empowering everyone to build reliable and efficient software.

  • snafu

    Easily assign underlying errors into domain-specific errors while adding context

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better json-spanned-value alternative or higher similarity.

json-spanned-value reviews and mentions

Posts with mentions or reviews of json-spanned-value. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-04-09.
  • Modular Errors in Rust
    3 projects | news.ycombinator.com | 9 Apr 2023
    > The nonsense end result of that line of logic is that you return a single boolean that corresponds to failure/success, so I assume that's not what you mean.

    I frequently find that is all that is necessary, and is exactly the correct solution, not "nonsense" whatsoever. Perhaps even that boolean is overkill: an unrecoverable bug should perhaps instead log and then terminate, producing no error condition for the caller of your library to worry about attempting to recover from whatsoever. Detailed error reporting can be done without obscenely distinct error types, and in fact detailed error reporting frequently benefits from a focus on the task itself instead of trying to structure data to leave the task of actually reporting the error to someone else, and kicking the can down the road.

    E.g. for parsing focused errors like this I'd be more interested in pretty printing the source line in question, underlining the error, etc. - I wrote https://github.com/MaulingMonkey/json-spanned-value for helping ease the display of bad JSON data in a manner that integrates with your IDE for ease of fixing said data by jumping directly to the cause.

    And then, admittedly, there are times when different errors should be recovered from differently. When the caller might wish to retry an operation after some errors, try a different operation after other, report file+line+range information for yet other errors, etc. - these have very concrete answers to "What do you expect the user of your library to do with this detailed information?" that are not difficult to answer at all.

    > Contrast the two error messages:

    Both are UTF8 strings without types adding anything obviously useful. A silly demo screenshot of errors that will open the offending document if closed, and navigate to the line/column of said error:

    https://github.com/MaulingMonkey/json-spanned-value/blob/mas...

    Which operates by immediately dumping the "errors" to terminal without any types involved whatsoever... nor even a boolean branch! Well, a real program might set a boolean so the CLI knows to exit(1) instead of using partially parsed data...

Stats

Basic json-spanned-value repo stats
1
9
10.0
over 3 years ago

MaulingMonkey/json-spanned-value is an open source project licensed under GNU General Public License v3.0 or later which is an OSI approved license.

The primary programming language of json-spanned-value is Rust.


Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com