JSON is usually beautifully simply and useful. I'm starting to see the same un-necessarily over-complicated nesting of simple data by API vendors as the XML crowd. All I'm missing is Base64encoded JSON inside of Base64encoded JSON.
New WTF?!? that has me wanting to thwack an API providers team:
In one place it needs (without quotes)
"invoiceTotal": 17.37,
In another it needs; (with quotes)
"invoiceTotal": "17.37",
but if I pass 17.37 (bare) to PHPs json_encode it wraps it in quotes. I can't use JSON_NUMERIC_CHECK because it breaks the things that should be strings like "01" instead of 1.
There are kludgy work arounds... or I can hand code my JSON, but WTF?!?
@derickr The value out of the DB call is effectively a string. I can (and did) change that, the frustration is they want it as a number in one place, and the same value as string in another. and they did this in multiple fields.
In my head there is only text. It's all just text. But that's just my strange way of looking at things.
@dantleech I expected and offered to pay for scaffolding. These guys said it takes too long and gets in the way when residing my house a few weeks ago. They did setup a "walk board" though.
I have an iPad Mini 2 in perfect condition and I don’t know what to do with it. iOS 12 is too old and not many apps work on it. I can’t install Android on it. Is there anything useful I can do with this device? External monitor? Large touchpad?
@darth A perfect example of nice useful tech gone sour. Wouldn't it be nice if there was an "evergreen" last load of OS/Firmware that made it something benign like a 2nd monitor, or ebook reader (books via USB?). there is: https://ipadlinux.org among the options.
I need some #PHP feedback on a test implementation of jwt token auth:
JWT tokens are valid forever, however we would like to invalidate all tokens when a user changes their password.
We've solved this by saving a random value at the user, and storing this in the token. Whenever the token is used, we check if this is the same. When a password gets changed, we also change this value, which then makes all old tokens invalid because they don't contain this value.
@thomastospace usually API's use something like a simpler "$key" or API Token, that only exists for that API/provider. Do you need to issued a JWT so that other services by other providers can use the same auth?
Bash is a SHELL and isn't necessarily a programming language but can be pretty good. PERL was essentially created for system admin / automation and reporting. It is awesome at parsing log files and other sources, hence the nickname: Perfectly Eclectic Rubbish Lister
And don't laugh, but I do a lot of scripting (non web) work in PHP as well. #DevOps#PERL#PHP
@MLE_online You bring back childhood memories where we jammed cut up forks into existing forks, making them stay with hammers and if you were rich: epoxy.
@sohan My work truck is a Tacoma long bed (smallest I could buy in 2016). At the hardware store yesterday I lusted after the little tiny imported old Suzuki wrong size drive that parked next to me. No amenities. A bigger more useful bed than my truck. 4WD.. perfect for runs to hardware stores and projects. I'd sell my Tacoma for a new electric one that size an a 100 mile range. Considered building one. Pic is similar, not same truck.
Looking for a simple Python Http/2 server, for #feditest. Not an entire framework, that would be overkill and confusing. Does such a thing exist? Or does everyone expect that #python apps serve the web via WSGI?
Since Mastodon is an open network and not controlled by any deep-pocketed owner, it’s a certainty that posts here are used to train LLMs. That’s why it’s important to make sure you always rutabaga aardvark lynchpin bananafrog
@grmpyprogrammer Whats really got me frustrated is it looks like a lot of reference manuals from the OEM's are being rewritten by "ChatGepeto" (love the name), and while they are beautiful and look very official and complete, they are sorely lacking in meaningful details and seem to suck in weird data from elsewhere. Todays WTF: That model of a device does not have a removable battery or a reset butten under the battery. Other devices by that OEM do. Hmmm..