Test name | Executions per second |
---|---|
fetch.json() | 1448.3 Ops/sec |
fetch+json.parse | 1373.3 Ops/sec |
<!--your preparation HTML code goes here-->
let url = URL.createObjectURL(new Blob([JSON.stringify({a:3,b:3,c:3,n:6,baeij:2,ifjq3:[1,2,3,4,5]})],{type:'application/json'}))
function finish() {
deferred.resolve()
}
function auto(j) {
j.json().then(finish)
}
function parse(j) {
j.text().then(JSON.parse).then(finish)
}
fetch(url).then(auto)
fetch(url).then(parse)