Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
C0D4681385y😞such wrong, much bad, comma seperated values as a string as a collection.... how did that ever get to production.
-
Knowing Microsoft, the first tuple object the is an an array of bool as a string if the day in enabled, the second tuple object is the “days of the week” enum in array as a string so “Monday, six Sundays, Tuesday”with the tuple itself being a string. But not knowing the endpoint makes this a wild guess.
-
myss45285yI'm really trying to see possible ways how to explain this, be a good cop and justify them, but as it looks like I simply can't..
-
Root826005yAPIs are not just wrappers for another service, just like designers aren't photoshop styli that understand english!
-
Root826005y@bkwilliams Just because a large corporation or project does smething wrong doesn't mean you should, too.
-
irene33945y@bkwilliams This particular one could also be represented like this.
{“sunday”:false,“monday”:true,”tuesday”:true,”wednesday”:false,”thursday”:false,”friday”:false,”saturday”:false} -
Who ever wrote that shit should be sent to an asylum for long time treatment.....
-
@irene And now imagine thousands of rows: What a waste of traffic and longer serialization / deserialization times. Sometimes there is a reason. I don’t know if there is one for this case, but might be
-
@NoToJavascript
These ""shortcuts"' aka let's compact till it gets ridiculous... Are wrong. You don't win.
When I read Irene's comment, you could use ISO representation, 1 for monday, 7 for sunday.
You'd have two TINYINT's, each tinyint costs 1 byte, total 2 bytes.
Beats every string storage.
Can be used as a JOIN table, allowing efficient index usage.
Even when not using a database, packing the stuff as an ENUM or ENUM like representation makes way more sense than an unreadable string.... -
dynamics guy here. if i get this correct the values are optionset values representing a day each originating from some record‘s multi-option-field and that’s indeed how it‘s presented in the web API. no way to influence this unfortunately.
{ “dow”: “10000001,10000002” }
Me: So what does this mean in the JSON response and why isn’t it a JSON collection?
Dynamics guys: that represents the days of the week. Because that is how it comes out of Microsoft Dynamics.
I’m thinking that they are either bad rest API programmers MS is bad at JSON. I can’t see the code so I don’t know which. No fixes because budget.
rant