I’m getting an arbitrary string (“content”) from a third party source and because of reasons I’m putting it in a Javascript object like this:
{ “url”: url, “content”: content }
Then calling JSON.stringify on it and passing it off somewhere else and calling JSON.parse, but when I do I get this:
Uncaught SyntaxError: Unexpected token in JSON at position 1306
I mean, it’s the one who created the damn JSON in the first place, now apparently I’m expected to deal with the fact that it’s poorly formed. The string has Chinese characters in it and so forth, I don’t want to have to care what’s in it, I want the language to deal with that.
How the hell are stringify and parse not transitive? Is there something built into the language that I can do to the string first to escape whatever this character is? I can’t get a straight answer to this googling it.
It transpires that some script on the page is fucking with my string. The stringified object is added to a div which is appended to the body, again because of reasons, and some script native to the site I’m using my extension on is somehow messing with my string. Also wrapping it in two <font style="vertical-align: inherit;"> tags. I don’t even want to know why. I should be able to work around this.
If I do that it will just do the same thing to the pre tag - i.e. insert font tags into it and mess around with the contents. It seems to have some hideous global MutationObserver or something that messes around with any element that gets added to the page.
Looks like the workaround is to append the element to the head instead, then whatever this script is won’t fuck with it. Chrome will allow me to append div elements to the head, which is not supposed to be allowed but whatever. Seems to work. If that ever gets outlawed I can switch to using meta elements.
The company I’m at pays 25% less if you are remote / midwest. Still 300k+ is normal even before share appreciation. As for the next step, it doesn’t hurt to take the interviews now that all interviewing is remote. PM me for a referral.
Probably should have figured that one out. I assume you’re not counting stuff like health insurance, though. I think the + threw me off. I read it as 300K plus something else, instead of ‘over 300K’.
Our stock is down quite a bit. I’m likely to get promoted (DS junior manager → senior manager) in a few months, but if they quote my stock at $300 when giving me RSUs instead of the $200 it is, gonna start hitting the leetcode (and DS equivalents) in the next year. I got recruiters banging down my door right now.
We’re currently quoting $300 to new hires, which is just insane. I can’t imagine many companies are this bad at doing stock price setting for RSUs, but maybe it’s just because we are crazy volatile.