Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
Valeyard
Mar 30, 2012


Grimey Drawer

Breakfast All Day posted:

code:

data: {  
  “type”: “articles”,
  “id”: “1”,
  “attributes”: {
    “title”: “Rails is Omakase”
  },
  “relationships”: {
    “author”: {
      “links”: {
        “self”: “/articles/1/relationships/author”,
        “related”: “/articles/1/author”
      },
      “data”: { “type”: “people”, “id”: “9” }
    }
  },
  “included”: [{
    “type”: “people”,
    “id”: “9”,
    “attributes”: {
      “first-name”: “Dan”,
      “last-name”: “Gebhardt”,
      “twitter”: “dgeb”
    },
    “links”: {
      “self”: “[url]http://example.com/people/9”[/url]
    }
  }
}


http://blog.redradix.com/future-json-apis/

everything is wearisome, more than one can say. what has been will be again, what has been done will be done again. there is nothing new under the api

Adbot
ADBOT LOVES YOU

pram
Jun 10, 2001

Valeyard posted:

its just bad and doesnt work!!! smp""""""

it works exactly as its supposed to

Valeyard
Mar 30, 2012


Grimey Drawer

pram posted:

it works exactly as its supposed to """""

im hijacking this thread to test web technologies

MrMoo
Sep 14, 2000

Max Facetime posted:

i'm digging all the

JavaScript code:
      "confidence":{  
      "resolutions":[  
      "relevance":0

The "resolutions" is a lookup in a database called Organization Authority which I guess from it being an array can return multiple values.

The "relevance" is from 0 to 1, so multiply by 100%.

No idea on the "confidence" node, the docs are rubbish.

quote:

aggregate: The confidence score.
dblookup: A value used internally by Open Calais to calculate the confidence score.
docid: The unique ID of the containing document, generated by Open Calais, and formatted as a URI.
resolution: A value used internally by Open Calais to calculate the confidence score.
statisticalfeature: A value used internally by Open Calais to calculate the confidence score.
subject: A hash tag generated by Open Calais. This ID points to the associated extracted entity or relation.

pram
Jun 10, 2001

Valeyard posted:

im hijacking this thread to test web technologies

if you dont want to be affected by cors then use curl, or literally anything but a browser

Valeyard
Mar 30, 2012


Grimey Drawer

pram posted:

if you dont want to be affected by cors then use curl, or literally anything but a browser

i know that youre right, but sometimes i just want to use jquery ok

im having these lovely encoding issues because the forums return latin1 encoded json payloads :ughh:

oh no blimp issue
Feb 23, 2011

Valeyard posted:

i know that youre right, but sometimes i just want to use jquery ok

im having these lovely encoding issues because the forums return latin1 encoded json payloads :ughh:

ill give you a payload iykwim

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Valeyard posted:

i know that youre right, but sometimes i just want to use jquery ok

im having these lovely encoding issues because the forums return latin1 encoded json payloads :ughh:


i think react can just be dropped in to things {unlike angular] so maybe use that instead of jquert

pram
Jun 10, 2001
cors is handled by the browser doesnt matter what framework you use

oh no blimp issue
Feb 23, 2011

cor, that's a framework and a half mate

Breakfast All Day
Oct 21, 2004

ice cold cors

NyetscapeNavigator
Sep 22, 2003

press X to JSON

Valeyard
Mar 30, 2012


Grimey Drawer
““““

Valeyard
Mar 30, 2012


Grimey Drawer
when you have an utf-8 encoded string, such as:

\u0093title\u0094

in which \u0093 and \u0094 are latin1 control characters for open and close speech marks

how the hell do you make this work properly and not end up all jumbled like

“title”

Valeyard
Mar 30, 2012


Grimey Drawer
grr

Valeyard
Mar 30, 2012


Grimey Drawer

Breakfast All Day posted:

code:

    “title”: “Rails is Omakase”

Triglav
Jun 2, 2007

IT IS HARAAM TO SEND SMILEY FACES THROUGH THE INTERNET
utf-8: “
html decimal: “
css hex: \201C
js hex: \u201C

solution is to programmatically do something hth

jony ive aces
Jun 14, 2012

designer of the lomarf car


Buglord

NoneMoreNegative posted:

Jason A. Badass

The Management
Jan 2, 2010

sup, bitch?

Doc Block posted:

LOL web """developers"""

pram
Jun 10, 2001
failtard

shitface
Nov 23, 2006

fought with a fail as gently caress rest service we have in one of our products this morning. a client wants to make a mass change to user accounts so no problem I thought, I'll pull the list from api/accounts and do a script to post the change back

except if you have a user called "R&D" for example when you GET it comes back as "R&bamp;D". well, no problem, that makes sense and means I don't have she'll scripting issues if there's quotes or ">" or anything else that'll gently caress up a script

...except when, you do post it you get "account 'R&bampD' does not exist" :mad: i suppose if your were really loving insane you could decode all the html entities then reencode with url encoding but I just skipped a step by exporting an xml file from the product that actually outputs "R&D", extracting the account names via xpath then a spot of shell magic to url encode those and post the change they wanted

another few hours of my life I'll never get back and I had to write "bamp" instead of amp in this loving post because I'm not wasting any more time figuring out lovely web stuff

shitface fucked around with this message at 08:48 on Aug 8, 2015

PleasingFungus
Oct 10, 2012
idiot asshole bitch who should fuck off
does tef still post? this feels like something tef would enjoy posting about.

Adbot
ADBOT LOVES YOU

Valeyard
Mar 30, 2012


Grimey Drawer

pram posted:

failtard

lovely Web Developer Driven Insane By Non-Printable Invisible Unicode Characters

  • Locked thread