A human-readable version of transit would be great. Transit’s caching quickly makes HTTP responses difficult to read in Chrome DevTools for example.
Logging systems which expect JSON lines on stdout may also be able to handle the Jsonista format. It would be great to extract the EDN data back from these JSON log entries (during debugging etc.).
Either alternative option sounds much better – my biggest issue with transit is language support (swift currently and elixir a while back), and a competing library would be counterproductive in that regard. But performance hasn’t been an issue so far, so maybe i’m not the target audience.
(btw. is there a transit 2, or did you mean that would be necessary to contribute?)
@maxweber the json-verbose transit encoder is pretty readable (it’s transit without caching).
NOTE: Transit is intended primarily as a wire protocol for transferring data between applications. If storing Transit data durably, readers and writers are expected to use the same version of Transit and you are responsible for migrating/transforming/re-storing that data when and if the transit format changes.
If this means that upgrading either transit in babashka or in the go binary will cause compatibility issues, then maybe I should have written my own subset of transit using a tagged json approach.
However, this would mean I would have to re-invent a parser of the custom tagged JSON in all the languages that pods can be written in, which is exactly why I just went with transit.
That said, the spec hasn’t changed since 2014 so maybe it’s not really a big issue.
If I recall, a motivation for Transit (relative to edn) was to achieve a good compromise on speed between Clojure servers and ClojureScript clients. In that client-server partnership, the more limiting party was the browser.
If I understood properly, jsonista measured performance only on the Clojure side. Since Transit in Javascript uses the browser’s JSON reader, it might not afford precisely the same headroom for speedup as the Clojure end.
To wade in a little deeper, I wonder, if jsonista’s Jackson-Databind approach is faster than whatever way Transit encodes JSON, why not swap out just that part of Transit-in-Clojure?