What even is a JSON number?
blog.trl.sn
What even is a JSON number?
1–10 of 151 posts
Re: What even is a JSON number?
#2I'm confused by this.
What is the precision of 0.1, relative to IEEE 754?
If I read it correctly, that statement is saying:
json_number_precision(json_number)
^ How do I calculate these values?Re: What even is a JSON number?
#3https://pkg.go.dev/encoding/json#Decoder.UseNumber
That allows you to capture/forward numbers without any loss of precision.
Re: What even is a JSON number?
#4I think the description for Go is inaccurate/incomplete. You can call this function to instruct the decoder to leave numbers in unparsed string form: https://pkg.go.dev/encoding/json#Decoder.UseNumber That allows you to capture/forward numbers without any loss of precision.
Re: What even is a JSON number?
#5Re: What even is a JSON number?
#6 Array
Binary
Date
Decimal128
Document
Double
Int32
Int64
MaxKey
MinKey
ObjectId
Regular Expression
Timestamp
https://www.mongodb.com/docs/manual/reference/mongodb-extend...Re: What even is a JSON number?
#7> I-JSON messages SHOULD NOT include numbers that express greater magnitude or precision than an IEEE 754 double precision number provides I'm confused by this. What is the precision of 0.1, relative to IEEE 754? If I read it correctly, that statement is saying: json_number_precision(json_number) ^ How do I calculate these values?
Re: What even is a JSON number?
#8Since JSON is so widely used it should be modified to support more types - Mongo DB's Extended JSON supports all the BSON (Binary) types: Array Binary Date Decimal128 Document Double Int32 Int64 MaxKey MinKey ObjectId Regular Expression Timestamp https://www.mongodb.com/docs/manual/reference/mongodb-extend...
Re: What even is a JSON number?
#9> I-JSON messages SHOULD NOT include numbers that express greater magnitude or precision than an IEEE 754 double precision number provides I'm confused by this. What is the precision of 0.1, relative to IEEE 754? If I read it correctly, that statement is saying: json_number_precision(json_number) ^ How do I calculate these values?
It does seem unclear what it means to exceed precision (given rounding is such an expected part of the way we use these numbers). Magnitude feels easier as at least you definitely run out of bits in the exponent.
Re: What even is a JSON number?
#10A little off topic, but fun to see that someone else has adopted that magical CSS theme! ( https://css.winterveil.net/ )