We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
goog.math/Long
goog.math/Long is not showing up very well
#?(:cljs (let [x (goog.math/Long.fromString "123")] (with-out-str (fipp/pprint {:test x} {:width 120}))))
It evaluates to the following
"{:test #object[#object[Long]]}\n"
Problem gets fixed by using the IEdn protocol
IEdn
#?(:cljs (extend-protocol IEdn goog.math/Long (-edn [x] (js/Number (.toString ^goog.math/Long x)))))
Is using the IEdn protocol is the right approach for this problem. If yes then please consider documenting the IEdn protocol in the readme.
The text was updated successfully, but these errors were encountered:
Yes, IEdn is the right way to do this. I should probably document it.
However, I think you may want to avoid losing precision by doing something like this:
#?(:cljs (extend-protocol IEdn goog.math/Long (-edn [x] (tagged-literal 'goog/long (.toString ^goog.math/Long x)))))
Sorry, something went wrong.
No branches or pull requests
goog.math/Long
is not showing up very wellIt evaluates to the following
Problem gets fixed by using the
IEdn
protocolIs using the
IEdn
protocol is the right approach for this problem. If yes then please consider documenting theIEdn
protocol in the readme.The text was updated successfully, but these errors were encountered: