What happens if you need to encode an integer larger than 64-bits? Shouldn't there be a way to encode a large integer as a buffer with a byte length? I don't...
1699
Stephan Beal
stephan.beal
Sep 21, 2011 6:42 pm
... It specifies neither a limit nor a minimum, at least as far as i was able to dig out of the RFC a few months ago. A 2-bit limit is, strictly speaking, ...
1700
rkalla123
Sep 21, 2011 6:58 pm
Don, Interesting point. Stephan and I had a discussion this morning about the portability of the numeric types across most (all) platforms breaking down when...
1701
rkalla123
Sep 21, 2011 7:01 pm
Tatu, I'd love to get this into jvm-serializers; I have been utilizing the same test data (MediaContent) and models for testing to try and get relatable...
1702
rkalla123
Sep 21, 2011 7:07 pm
Martin, Great catches, both issues fixed in the specification and my mind expanded accordingly ;)...
1703
rkalla123
Sep 21, 2011 7:42 pm
In another thread I submitted a proposal for a binary format specification for JSON that you might find handy in an embedded system: ...
1704
Stephan Beal
stephan.beal
Sep 21, 2011 8:27 pm
... It sounds like binary is your best bet, but if you're willing to hack/experiment a little... i have a portable C89/C99 json library ( ...
1705
Mark Joseph
markjoseph_sc
Sep 21, 2011 10:10 pm
I don't see the point of using something new for binary data. Clearly this is not JSON. If you have an application that needs an encoding that handles...
1706
Don Owens
regexman
Sep 21, 2011 11:57 pm
I've seen very large numbers used in JSON. In Perl, that can be represented as a Math::BigInt object. And that is the way I have implemented it in my JSON...
1707
rkalla123
Sep 22, 2011 2:50 am
Don, I see your point. The way I understand it is that this would require 2 new data types, effectively BigInt and BigDecimal. So say something along these...
1708
Tatu Saloranta
cowtowncoder
Sep 22, 2011 6:17 am
... Correct, format does not aim for minimal complexity of implementations. But for space efficiency it is pretty much a requirement as small set of names is...
1709
Tatu Saloranta
cowtowncoder
Sep 22, 2011 6:20 am
... Yes, to properly support full JSON data set, one should provide BigInteger/-Decimal either binary representations or by embedding textual representation. ...
1710
Stephan Beal
stephan.beal
Sep 22, 2011 7:10 am
... Don's point is valid but it assumes that every environment has this support, and that's not the case. Maybe his use cases/environments have that. When ...
1711
Stephan Beal
stephan.beal
Sep 22, 2011 7:11 am
... Correct, format does not aim for minimal complexity of implementations. ... But for the decoder it's required, or at least that's how i understood the ...
1712
Stephan Beal
stephan.beal
Sep 22, 2011 7:12 am
... i don't agree: JSON does not specify an integer size, which means that supporting only an 8-bit int is still valid JSON. -- ... ...
1713
rkalla123
Sep 22, 2011 1:43 pm
Stephan, It reminds me of our conversation earlier about 64-bit. As you mentioned, Don has a great point, but the uniqueness of the data structure (I doubt the...
1714
Don Owens
regexman
Sep 22, 2011 2:15 pm
Yes, that is what I was getting at. But see comments embedded. ... complement and such is probably too much work. Maybe just specify that the first bit...
1715
Don Owens
regexman
Sep 22, 2011 2:21 pm
I didn't mean to imply that every environment has this support -- I'm very aware that most environments do not. However, the same issue arises when using...
1716
Don Owens
regexman
Sep 22, 2011 2:33 pm
I forgot to add that encoders should only use the big number format if the number is too big to fit in int64 (or int32, depending on which will be the largest...
1717
Raymond Reggers
adaptivdesign
Sep 22, 2011 9:29 pm
Hey all, It might be worth it, to take a peek at the AMF0 and AMF3 protocol. The AM3 protocol makes a distinction between integer and number data. Taken from...
1718
Milo Sredkov
milosredkov
Sep 22, 2011 9:48 pm
Hello Riyad, Stephan, Don, Tatu, and all group members, I recently analysed about 70 of the libraries linked from json.org (almost all listed in the C++, C,...
1719
Stephan Beal
stephan.beal
Sep 22, 2011 10:00 pm
On Thu, Sep 22, 2011 at 11:47 PM, Milo Sredkov <miloslav@...> wrote: supported by the specification, and tools try their best to deliver it ... i would...
1720
Tatu Saloranta
cowtowncoder
Sep 23, 2011 12:28 am
... You have a very interesting way of reading specifications -- when spec does not limit magnitude or precision, you claim it's fine to use whatever size: by...
1721
Tatu Saloranta
cowtowncoder
Sep 23, 2011 12:31 am
... I agree with this, and also with the general idea of using most economic applicable type (i.e. not using unlimited-length representation for small...
1722
Stephan Beal
stephan.beal
Sep 23, 2011 12:47 am
... Absolutely. That's a literal interpretation (but not a sane one, i admit!). ... Interpreted that way, all implementations must implement...
1723
Patrick Maupin
patmaupin
Sep 23, 2011 3:55 pm
I'm all for big integer support. I use it all the time (from Python). As an aside, as others have pointed out, there are other similar efforts around. If...
1724
rkalla123
Sep 23, 2011 4:16 pm
Patrick, Thank you for the pointer....
1725
John Cowan
johnwcowan
Sep 23, 2011 4:36 pm
... Unfortunately, the various pickle formats are apparently not documented anywhere that Google can find. Can you provide a pointer? (There is also a...
1726
rkalla123
Sep 23, 2011 4:43 pm
Don, Great feedback so far, I have a few thoughts on the subject: 1. The hard-to-measure value of a specification being simple and immediately grok'able is...
1727
rkalla123
Sep 23, 2011 4:47 pm
Milo, Agreed on how the format must be presented on the website, I am keeping your post bookmarked as a TODO list as I work on formalizing the spec on the...