WoWCenter.pl
wikass zabił Mythrax the Unraveler (Normal Uldir) po raz 2.     
kuturin zdobył 7th Legionnaire's Cuffs.     
Nikandra spełnił kryterium Loot 200,000 gold osiągnięcia Got My Mind On My Money.     
Tooly zdobył Fairweather Helm.     
Muattin zdobył osiągnięcie The Dirty Five.     
Yoozku zdobył Parrotfeather Cloak.     
Mlody89 zdobył Royal Apothecary Drape.     
Weakness zabił Dazar, The First King (Mythic King's Rest) po raz 6.     
liq spełnił kryterium osiągnięcia Saving for a Rainy Day.     
Osiol spełnił kryterium osiągnięcia Saving for a Rainy Day.     
Wuntu zabił Zek'voz, Herald of N'zoth (Heroic Uldir) po raz 1.     
Olsa zabił Vectis (Heroic Uldir) po raz 6.     
Sarenus spełnił kryterium osiągnięcia Saving for a Rainy Day.     
kajtasus zdobył osiągnięcie Come Sail Away.     
ossir spełnił kryterium osiągnięcia Saving for a Rainy Day.     
mcpablo spełnił kryterium Alliance players slain. osiągnięcia Frontline Slayer.     
Emmm zabił Taloc (Heroic Uldir) po raz 17.     
AsaGorth spełnił kryterium Big-Mouth Clam osiągnięcia The Oceanographer.     

[RFC] collapsable white space characters

blizz -> wysłany:
Following is taken from http://us.battle.net/api/wow/realm/status?realm=Medivh&realm=Dunemaul

{
"realms":[
{
"type":"pvp",
"queue":false,
"status":true,
"population":"medium",
"name":"Dunemaul",
"slug":"dunemaul"
},
{
"type":"pve",
"queue":false,
"status":true,
"population":"medium",
"name":"Medivh",
"slug":"medivh"
}
]
}

The example above contains 302 characters, 340 bytes and 20 lines. Of which 92 characters are spaces (45 per realm entry), 19 characters are carriage returns and 19 characters are line feeds as illustrated below.

{[\r][\n]
.."realms":[[\r][\n]
....{[\r][\n]"
......"type":"pvp",[\r][\n]
......"queue":false,[\r][\n]
......"status":true,[\r][\n]"
......"population":"medium",[\r][\n]
......"name":"Dunemaul",[\r][\n]
......"slug":"dunemaul"[\r][\n]
....},[\r][\n]"
....{[\r][\n]"
......"type":"pve",[\r][\n]
......"queue":false,[\r][\n]
......"status":true,[\r][\n]
......"population":"low",[\r][\n]
......"name":"Medivh",[\r][\n]
......"slug":"medivh"[\r][\n]
....}[\r][\n]
..][\r][\n]
}

Once collapsed/condensed the same information is contained in 210 characters, 210 bytes and of course 1 line. That is a net gain of a little over 38% ((340-210)/340*100) compared to the original byte size. JSON suffers from the same dramatic inflation that all hierarchical based notations do; it gets exponentially worse the more nested the data is. With the upcoming API’s where data becomes more nested I can see that number going way up.

Al the disadvantages of the redundant overhead are quite apparent. The advantage is also quite apparent: a more human friendly readable form. That is why I would like to plead for an additional parameter on all API URL’s with a JSON payload with which the overhead can be toggled on or off. Something along the lines of a boolean ‘collapse’ which can be set to ‘true’ or ‘false’. I would also recommend to have the payload be collapsed by default.

*EDIT*: typo
blizz -> wysłany:
05/20/2011 08:40 AMPosted by Ulminia
in php using the trim fuction will remove the whitespace but only on our side not blizzards. i hope they solve this otherwise there will be a larger then nessary increase in lag and bandwidth on the api's. and potental timeout on scripts running pull commands



The PHP trim will only remove the whitespace on either side of the string, which won't buy you much if the string has a lot of whitespace inside of it.

Once we finalize the character and guild APIs, we'll probably take out the pretty indentation from the JSON output.
blizz -> wysłany:
05/22/2011 03:19 PMPosted by Seafu
It seems really odd that they would return JSON with white space formatting in the first place. Not sure what implementation their using but I would of thought that their specifically adding the formating, which is more overhead plus bandwidth. Whitespace formatting on JSON is pointless when you have a tool like firebug



It was a conscious decision to expose the realm, character and guild data as 'pretty printed' during this preview period.
blizz -> wysłany:
05/25/2011 08:31 PMPosted by Oxoxoxoxen
I think someone **COUGH*COUGH*Straton*COUGH** should comp Blabbermouth some game time for his efforts he put in to post on the US forms... :D



I don't have the power or ability to do that.