On XML: > Not sure anyone really knows how XML happened. It’s > basically the W3C’s fault, I think? It’s okay for some > things but in the end I’m not sure it’s something anyone > actually wants to use, it’s just going to be one more of > those mistakes of the past. Look, I was doing web dev when XMLRPC was in. For simple API stuff, JSON ended up being worlds better. No fiddly XML preamble, no schemas, no envelopes,…
Better Than JSON?
141–150 of 153 posts
Re: Better Than JSON?
#142All of the mentioned formats are now insecure by default, because they deserialize objects. (Just msgpack not, which has other problems). Even JSON, the most secure format originally became insecure in its 1st update. All the binary JSON variants, like BSON went bonkers.
Re: Better Than JSON?
#143Earlier quoted context omitted.
You need to parse that. For graphs with thousands of data points just use Unix time plus a timezone or use the browser's timezone. ISO 8601 would leave your graphs churning for seconds.
If parse time is a significant concern, why are you using JSON?
Re: Better Than JSON?
#144Earlier quoted context omitted.
If parse time is a significant concern, why are you using JSON?
Because we feed the data to Js. No need for additional overhead parsing string based timestamps. Unix epoch is just an int. We don't need pre 1970 timestamps.
Welcome to Node.js v12.18.4.
Type ".help" for more information.
> new Date(-10000)
1969-12-31T23:59:50.000ZRe: Better Than JSON?
#145Re: Better Than JSON?
#146Earlier quoted context omitted.
The issue with XML is that it was mostly pushed upon developers without any deeper understanding. So there's a ton of utterly crap XML applications out there with no rhyme or reason, and these crap XML enterprise apps are most developer's understanding of "real world XML". Similar to how terrible C++ code being all over the place is making people hate C++ the language. ------- XML can be used very well however: its u…
Around 2009, I worked on an application whose web interface and API were the same url -- it was served as an XML data file, with an XSLT transform to make it pretty for the browser. It was so comfortable.
Re: Better Than JSON?
#147Earlier quoted context omitted.
If parse time is a significant concern, why are you using JSON?
Because we feed the data to Js. No need for additional overhead parsing string based timestamps. Unix epoch is just an int. We don't need pre 1970 timestamps.
Re: Better Than JSON?
#148Earlier quoted context omitted.
Because we feed the data to Js. No need for additional overhead parsing string based timestamps. Unix epoch is just an int. We don't need pre 1970 timestamps.
JavaScript can parse binary serialised protobufs.
Re: Better Than JSON?
#149There are a bunch more possible entries in the human-readable category, one of the more popular contenders is TOML. https://github.com/toml-lang/toml . There are more. I don't know if java dot-properties file is worth including.
The speaks to the context of serialization formats, which TOML isn't.
Re: Better Than JSON?
#150Earlier quoted context omitted.
I guess the ARM instruction you are thinking of is FJCVTZS, which implements the special ToInt32 operation required by JavaScript. https://stackoverflow.com/questions/50966676/why-do-arm-chip... It is nothing to do with JSON.
You think an instruction with Javascript in the name, that converts JavaScript floating-point to signed fixed-point, rounding towards zero, isn't used when parsing JSON?