Earlier quoted context omitted.
"simplicity of http/json" always elicits snickering from me. HTTP, by itself, is one of the more complex layer-7 protocols known to man. UTF-8 is not simple. Converting a decimal string representation of a floating point value into IEEE 754 is not simple (particularly compared to... memcpy). In a bizarre example of the tail wagging the dog, the ARM ISA has added an instruction specifically for parsing JSON... There's…
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.
Better Than JSON?
121–130 of 153 posts
Re: Better Than JSON?
#122You don't have to worry about maintaining numeric field tags, can remove fields, can make previously required fields optional (by promoting them to unions with null), or even change their type (by promoting them to unions of and )
You need to pass your schema around with your data somehow, but there's a file format specified for that, and you can still just dump to JSON if you can't be bothered.
The schemas are specified in JSON too... which in my view makes it more robust than the JSON + JSON-Schema combo
[0] https://avro.apache.org/docs/current/spec.html#Schema+Resolu...
Re: Better Than JSON?
#123JavaScript is better than JSON because it has loops, conditionals, comments, modules, functional programs, typing, etc etc
Re: Better Than JSON?
#124Earlier quoted context omitted.
Yeah, the author didn’t specify why he thought EDN wasn’t more than “a good start.” I’m curious what it’s missing!
What's missing is major projects using it I think. Note how for every example he lists the big players keeping it alive.
Re: Better Than JSON?
#125Earlier quoted context omitted.
Definitely not for simplicity of server/client code. Using a Json serialization library basically means implementing a POJO at this point.
I was more referring to the overkill nature of needing a HTTP server rather than the ease of integration of JSON parsing code.
Re: Better Than JSON?
#126On 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,…
Re: Better Than JSON?
#127Earlier quoted context omitted.
Provided you never need to use integers > 53 bits, dates, binary data, comments or validate what you're sending or receiving it's totally fine.
I-JSON specifies how to represent dates and binary data in strings. https://tools.ietf.org/html/rfc7493 JSON Schema http://json-schema.org/ is widely used for things like Swagger / OpenAPI.
Re: Better Than JSON?
#128There 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.
Re: Better Than JSON?
#129On 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,…
Re: Better Than JSON?
#130On 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,…
Much agreement here, and from the exact same usecase. Probably the easiest B2B API integration scenario I worked with in the past was XML + XML Schema validation. And I still think XML is more readable in many cases than JSON, because while verbose the hierarchical structure is very easy to grasp, sometimes I misread an entire JSON document at first because I missed a quick "[" or "[{" (yes I have also misread XML do…
And then the ratchet turns, and the pendelum swings in reverse, and suddenly that thing sent from god was instead discovered to be sent from satan... and you're still trying to explain that tradeoffs exist