FedEx Tracking XML Schema
-
@Groaner said in FedEx Tracking XML Schema:
Fascinating. I don't recall signing up to be the world's foremost authority on file format storage efficiency - I signed up to make an offhand comment about how a supposedly bloated file format compressed surprisingly well in my testing. To anyone familiar with how compression algorithms work, this should be non-intuitive, but interesting. Is there a new rule around here where we're all expected to post from a position of authority with reams of data to back up our statements? If so, I'm going to hold the rest of you to it and I expect post volume to plummet accordingly.
YMBNH. Pedantry is one of the top 5 desirable activities on this forum.
-
@abarker said in FedEx Tracking XML Schema:
@Groaner said in FedEx Tracking XML Schema:
Fascinating. I don't recall signing up to be the world's foremost authority on file format storage efficiency - I signed up to make an offhand comment about how a supposedly bloated file format compressed surprisingly well in my testing. To anyone familiar with how compression algorithms work, this should be non-intuitive, but interesting. Is there a new rule around here where we're all expected to post from a position of authority with reams of data to back up our statements? If so, I'm going to hold the rest of you to it and I expect post volume to plummet accordingly.
YMBNH. Pedantry is one of the top 5 desirable activities on this forum.
Pedantry is not an activity.
-
@error said in FedEx Tracking XML Schema:
@abarker said in FedEx Tracking XML Schema:
@Groaner said in FedEx Tracking XML Schema:
Fascinating. I don't recall signing up to be the world's foremost authority on file format storage efficiency - I signed up to make an offhand comment about how a supposedly bloated file format compressed surprisingly well in my testing. To anyone familiar with how compression algorithms work, this should be non-intuitive, but interesting. Is there a new rule around here where we're all expected to post from a position of authority with reams of data to back up our statements? If so, I'm going to hold the rest of you to it and I expect post volume to plummet accordingly.
YMBNH. Pedantry is one of the top 5 desirable activities on this forum.
Pedantry is not an activity.
Excellent example!
-
@Groaner said in FedEx Tracking XML Schema:
@Gąska said in FedEx Tracking XML Schema:
@Groaner said in FedEx Tracking XML Schema:
@abarker said in FedEx Tracking XML Schema:
@Groaner said in FedEx Tracking XML Schema:
I don't get the hate for XML. If the verbosity is offensive, it compresses very nicely, such that compressed CSV offered less than a 15% reduction in archive size over compressed XML in some testing I did.
XML doesn't always translate well to CSV, so that isn't a very good comparison. A better comparison would be XML versus JSON.
EDIT: Yeah, I'm a day late. So what?
Well, in my use case, it did.
And in my use case, converting Bash shell script into Windows batch file was a matter of changing file extension. There's a reason people say anecdote is no evidence.
Fascinating. I don't recall signing up to be the world's foremost authority on file format storage efficiency
And I don't recall signing up for a moralizing talk how the forum ought to be used. You say what you want, I say what I want, and if you don't like it, there's ignore button .
Also, if you find good compression rate of XML non-intuitive, then your intuition sucks.
-
@Groaner said in FedEx Tracking XML Schema:
Is there a new rule around here where we're all expected to post from a position of authority with reams of data to back up our statements?
Yep. Gotta have passed peer review.
Sorry, not my rule.
-
@boomzilla said in FedEx Tracking XML Schema:
@Groaner said in FedEx Tracking XML Schema:
Is there a new rule around here where we're all expected to post from a position of authority with reams of data to back up our statements?
Yep. Gotta have passed peer review.
Sorry, not my rule.
Hang on, I gotta go pass something...
-
@abarker said in FedEx Tracking XML Schema:
@Groaner said in FedEx Tracking XML Schema:
Fascinating. I don't recall signing up to be the world's foremost authority on file format storage efficiency - I signed up to make an offhand comment about how a supposedly bloated file format compressed surprisingly well in my testing. To anyone familiar with how compression algorithms work, this should be non-intuitive, but interesting. Is there a new rule around here where we're all expected to post from a position of authority with reams of data to back up our statements? If so, I'm going to hold the rest of you to it and I expect post volume to plummet accordingly.
YMBNH. Pedantry is one of the top 5 desirable activities on this forum.
Can you name the other four?
-
@Groaner said in FedEx Tracking XML Schema:
@abarker said in FedEx Tracking XML Schema:
@Groaner said in FedEx Tracking XML Schema:
Fascinating. I don't recall signing up to be the world's foremost authority on file format storage efficiency - I signed up to make an offhand comment about how a supposedly bloated file format compressed surprisingly well in my testing. To anyone familiar with how compression algorithms work, this should be non-intuitive, but interesting. Is there a new rule around here where we're all expected to post from a position of authority with reams of data to back up our statements? If so, I'm going to hold the rest of you to it and I expect post volume to plummet accordingly.
YMBNH. Pedantry is one of the top 5 desirable activities on this forum.
Can you name the other four?
You want me to explain a ?
-
@KattMan said in FedEx Tracking XML Schema:
oh and everyone will disagree with me on this.
Probably because you're wrong.
What the fuck does verifiable structure have to do with it? Why do you think XML is intrinsically better at it, and what are the 'benefits', and so on? It's very hard to argue against reasons if you don't give the reasons.Also, if both are easy to parse, what does that have to do with the distinction? Why mention it?
-
@Gąska said in FedEx Tracking XML Schema:
Do you know how many implementations are stuck on Schema version 4?
There's a version 4?
Oh, you mean a fourth draft.
Oh, wait, there's a more recent version.
-
@Watson said in FedEx Tracking XML Schema:
@Gąska said in FedEx Tracking XML Schema:
Do you know how many implementations are stuck on Schema version 4?
There's a version 4?
Oh, you mean a fourth draft.
Tomato, potato.
Oh, wait, there's a more recent version.
What do you think I meant by "stuck"?
-
@Gąska Didn't have any opinion either way until I looked it up. When I did I saw that things were even more lackadaisical than I expected from your description.
-
@dfdub said in FedEx Tracking XML Schema:
@Steve_The_Cynic said in FedEx Tracking XML Schema:
But I've had those addresses (a whole /56, no less) since 23 December 2016.
I still
don't have IPv6live in hell. Because Vodafone.FTFY.
-
@Gąska said in FedEx Tracking XML Schema:
Now you're going to say
to which I'll replyHuh, when I did that I was told I'm being extremely disrespectful:
inventing what I'm going to say and preemptively replying to that instead of waiting for me to actually respond was just mean.
-
@topspin I am being disrespectful. I have no respect for people who can't read.
-
@Gąska Fair enough.
-
@dkf said in FedEx Tracking XML Schema:
JSON is marginally better
JSON has its own problems. My favorite is that has no native date format. Everyone counters with "Use ISO8601", but that still means that deserializers don't natively deserialize as dates and you need client-side metadata if you want to automate the conversion (not to mention that Javascript dates don't support 90% of the extras that 8601 has).
-
@Jaime said in FedEx Tracking XML Schema:
Everyone counters with "Use ISO8601"
* laughts in Powershell *
If you are not careful and use a .NET
DateTime
object in a Powershell object, then stream it throughConvertTo-Json
you get this fancy result: (second property was added later for human consumption){ "BuildDateTime": "\/Date(1592503997706)\/", "BuildTime": "2020-06-18T18:13:17.7061207Z" }
Not to say anything of those who prefer a raw
time_t
integer value...
-
@JBert That is Microsoft's hack to identify dates as "different". It actually solves the "JSON doesn't have dates" problem by using a non-canonical string that would never happen by accident (due to a weirdness in the JSON spec).
I agree that it isn't human readable, but I care very little. Human readability isn't really worth all that much to me.
Think of this: if the AJAX world had standardized on ASN.1, then the browser world would have built in an ASN.1 viewer by now and this would no longer be a problem.
-
@Jaime said in FedEx Tracking XML Schema:
My favorite is that has no native date format. Everyone counters with "Use ISO8601"
Pfff, amateurs. Just use the number of seconds since the Unix Epoch (which, because Javascript, can be as fractional as any sane person might need). Rendering that is someone else's problem (and JSON isn't really human-readable anyway except in the most trivial cases so the “but human-readable” horse was never in the running).
-
@Jaime said in FedEx Tracking XML Schema:
@JBert That is Microsoft's hack to identify dates as "different". It actually solves the "JSON doesn't have dates" problem by using a non-canonical string that would never happen by accident (due to a weirdness in the JSON spec).
More precisely, Microsoft (ab)uses the fact that a
/
character can be optionally escaped as\/
, and that compliant parsers ignore the extra backslash. They're using this as a side-channel to signal "this string is not a string, it's a date!"Notably, the reason the JSON spec explicitly does not allow comments is to prevent vendors from implementing proprietary metadata decorations, which would hurt interoperability. Microsoft found a way, though.
-
@Groaner said in FedEx Tracking XML Schema:
@abarker said in FedEx Tracking XML Schema:
@Groaner said in FedEx Tracking XML Schema:
Fascinating. I don't recall signing up to be the world's foremost authority on file format storage efficiency - I signed up to make an offhand comment about how a supposedly bloated file format compressed surprisingly well in my testing. To anyone familiar with how compression algorithms work, this should be non-intuitive, but interesting. Is there a new rule around here where we're all expected to post from a position of authority with reams of data to back up our statements? If so, I'm going to hold the rest of you to it and I expect post volume to plummet accordingly.
YMBNH. Pedantry is one of the top 5 desirable activities on this forum.
Can you name the other four?
I do know bigotry is another one.
-
@Tsaukpaetra said in FedEx Tracking XML Schema:
@Groaner said in FedEx Tracking XML Schema:
@abarker said in FedEx Tracking XML Schema:
@Groaner said in FedEx Tracking XML Schema:
Fascinating. I don't recall signing up to be the world's foremost authority on file format storage efficiency - I signed up to make an offhand comment about how a supposedly bloated file format compressed surprisingly well in my testing. To anyone familiar with how compression algorithms work, this should be non-intuitive, but interesting. Is there a new rule around here where we're all expected to post from a position of authority with reams of data to back up our statements? If so, I'm going to hold the rest of you to it and I expect post volume to plummet accordingly.
YMBNH. Pedantry is one of the top 5 desirable activities on this forum.
Can you name the other four?
I do know bigotry is another one.
@error_bot xkcd spice girls
-
-
@Gąska said in FedEx Tracking XML Schema:
Do you know how many implementations are stuck on Schema version 4? I'll tell you: a lot of them. It's because there's been a three year period where JSON Schema wasn't updated at all despite still being largely incomplete. And when the spec was finally updated, the implementations weren't, so you can shove the new spec up your ass because that's the only thing it's good for, provided you print it out first because with the electronic version you can't even do that.
I went and checked the very first thing that came to my mind: the JSON Schema system for Newtonsoft.JSON.
Very first bullet point on the site's frontpage says:
It doesn't mention anything about generating classes from schemas, but... why would you want to do that? Isn't that backwards? The data is a serialized version of the class, so you build the class and then generate a schema to match it. (Which this library supports!)
-
@dkf said in FedEx Tracking XML Schema:
and JSON isn't really human-readable anyway except in the most trivial cases so the “but human-readable” horse was never in the running
It's human-readable in the same sense that source code is, and that "horse" is important for exactly the same reason: allowing people who know what they're doing to look at it and figure out what's going on -- especially when something goes wrong.
-
@Mason_Wheeler said in FedEx Tracking XML Schema:
It doesn't mention anything about generating classes from schemas, but... why would you want to do that? Isn't that backwards? The data is a serialized version of the class, so you build the class and then generate a schema to match it. (Which this library supports!)
How do you write your class to enforce a tagged union in generated schema? (A
oneOf
with several values of typeobject
, each with aconst
property of the same name but different value each time, and also other properties specific to particular kind.)
-
@Gąska said in FedEx Tracking XML Schema:
@Mason_Wheeler said in FedEx Tracking XML Schema:
It doesn't mention anything about generating classes from schemas, but... why would you want to do that? Isn't that backwards? The data is a serialized version of the class, so you build the class and then generate a schema to match it. (Which this library supports!)
How do you write your class to enforce a tagged union in generated schema?
You don't. You write the class, and generate the schema from the class. Therefore, if the class doesn't have a difficult-to-implement tagged union, neither will the schema.
a
const
property ... different value each time
-
@Mason_Wheeler said in FedEx Tracking XML Schema:
@Gąska said in FedEx Tracking XML Schema:
@Mason_Wheeler said in FedEx Tracking XML Schema:
It doesn't mention anything about generating classes from schemas, but... why would you want to do that? Isn't that backwards? The data is a serialized version of the class, so you build the class and then generate a schema to match it. (Which this library supports!)
How do you write your class to enforce a tagged union in generated schema?
You don't. You write the class, and generate the schema from the class. Therefore, if the class doesn't have a difficult-to-implement tagged union, neither will the schema.
If it's impossible to write a class that will make a generator generate a tagged union in the schema, then the generator is useless when I want a tagged union in the schema.
a
const
property ... different value each timeI mean literally what I said.
{ "$id": "https://example.com/shit", "$schema": "https://json-schema.org/draft/2019-09/schema", "title": "shit", "oneOf": [ { "type": "object", "required": [ "kind", "value" ], "properties": { "kind": { "const": "integer" }, "value": { "type": "number" } } }, { "type": "object", "required": [ "kind", "text" ], "properties": { "kind": { "const": "text" }, "text": { "type": "string" } } } ] }
-
Newtonsoft.JSON.
Not so standard anymore, now that Microsoft ditched it in .NET Core 3.0.
-
@Unperverted-Vixen Meh, not exactly. They came up with something new that's theoretically supposed to replace it, but it's seeing very little actual use because it can't do a bunch of stuff that people used Newtonsoft for all the time.
-
@JBert said in FedEx Tracking XML Schema:
"BuildDateTime": "\/Date(1592503997706)\/",
The airquotes in the format helpfully illustrat that JSON doesn't support
Date
s, only Date
-
@Jaime said in FedEx Tracking XML Schema:
then the browser world would have built in an ASN.1 viewer by now
The Certificate Viewer tab that opens will display detailed information about the certificate, such as issuer, period of validity, fingerprints and more.
-
laughs in TOML
BuildDateTime = 2020-06-18T18:13:17.7061207Z
-
@pie_flavor TOML is fine until you have a list of objects each containing a list of objects each containing a list - as is very common whenever you need serialization.
-
[[a]] [[a.b]] c = [2020-06-18T18:13:17.7061207Z]
I mean, it's not the prettiest syntax, but does that really matter? Especially considering if you're serializing it you're probably using the inline object syntax, which reduces it to the much less cluttery
a=[{b=[{c=[2020-06-18T18:13:17.7061207Z]}]}]
.
-
@pie_flavor said in FedEx Tracking XML Schema:
[[a]] [[a.b]] c = [2020-06-18T18:13:17.7061207Z]
I mean, it's not the prettiest syntax, but does that really matter? Especially considering if you're serializing it you're probably using the inline object syntax, which reduces it to the much less cluttery
a=[{b=[{c=[2020-06-18T18:13:17.7061207Z]}]}]
.That "much less cluttery" version gave me bracket cancer.
-
@Benjamin-Hall We're comparing it to JSON, yeah? Where's the difference?
-
@pie_flavor said in FedEx Tracking XML Schema:
@Benjamin-Hall We're comparing it to JSON, yeah? Where's the difference?
To be honest, I think it's the one-line nature. Spread out with proper indentation and it's probably only a mild , on the same class as writing complex JSON by hand.
-
@Benjamin-Hall well, that's the fun part of TOML. It makes sure you're using table headers wherever possible, because newlines are not allowed in inline tables.
-
@pie_flavor said in FedEx Tracking XML Schema:
@Benjamin-Hall well, that's the fun part of TOML. It makes sure you're using table headers wherever possible, because newlines are not allowed in inline tables.
I'm just here for the trolling, honestly. JSON does (the very little) I need from it, and isn't painful to use (edit: because I don't need very much from it). I've done some XML, and it...sucked. Mostly because I was reverse-engineering two different, unexplained schema that used painfully-different syntax and representations for the exact same underlying data.
I've never used TOML and have no opinion other than that one-line syntax is just plain butt ugly.
-
@Benjamin-Hall said in FedEx Tracking XML Schema:
I've never used TOML and have no opinion other than that one-line syntax is just plain butt ugly.
It's great. It is unique in it being designed to be pretty accessible to people who may have a hard time understanding object structure. Curly braces can be weird to follow for a non-programmer, but the section-header syntax makes perfect sense. A bit hard to fit INI-style syntax into JSON-land's idea of lists of objects, but TOML manages it pretty well.
-
Our API in version 3 is XML because version 2 of the application had an XML interface because a customer asked that there be an XML interface I believe. There has been talk of adding a JSON API but who has the time? We really need to write version 4 because a lot of version 3 (in C# ,net) is really version 2 (in Borland C++) copypastad into a .cs file and bent into a technically C# shape. It's really not my fault, I swear.
-
@pie_flavor said in FedEx Tracking XML Schema:
It's great. It is unique in it being designed to be pretty accessible to people who may have a hard time understanding object structure.
That doesn't sound like an advantage.
A bit hard to fit INI-style syntax into JSON-land's idea of lists of objects, but TOML manages it pretty well.
I'll need some examples side by side with json.
-
@pie_flavor said in FedEx Tracking XML Schema:
TOML
Knowing the "sense of humour" that people who name these things have, I'm going to assume that stands for "the other markup language"
-
@Jaloopa actually it's Tom's Obvious, Minimal Language. It should come as no surprise that the creator's first name is Tom.
-
@Jaloopa Tom's Obvious Minimal Language.
e:
-
@pie_flavor haha d by seconds!
-
@Gąska well, 'd the mention of the .
-
@pie_flavor but my post is more informative. Both of them. Checkmate, atheist!