Jump to content

alliance API: unescaped \ in alliance name is not valid json


martbhell
 Share

Recommended Posts

Hi, 

 

http://politicsandwar.com/api/alliance/id=1972

 

looks like below and if I throw it at http://jsonlint.com/and https://jsonformatter.curiousconcept.com/ it says it's invalid.

It seems to be the backslash in "\m/" and fix could be to escape all backslashes with backslashes .

 

{
    "kind": "alliance",
    "data": {
        "alliancedata": {
            "allianceid": 1972,
            "name": "\m/",
   "leaderids": [ 22933, 26569],
   "score": 1218.60,
   "color": "black",
   "members": 7,
            "accepting members": 1,
   "applicants": 0,
            "flagurl": "https://politicsandwar.com/img/flags/zimbabwe.jpg",
   "forumurl": "",
   "irc": "#blingin",
   "gdp": "3961879425.82",
   "cities": "18",
   "soldiers": "94000",
   "tanks": "1500",
   "aircraft": "413",
   "ships": "5",
   "missiles": "3",
   "nukes": "0",
   "treasures": "0"
   }
  }
}

 

 

Link to comment
Share on other sites

Should be fixed in the next patch.

 

Looks like it made it in :) Thanks!

 

{

    "kind": "alliance",

    "data": {

        "alliancedata": {

            "allianceid": 1972,

            "name": "\\m/",

   "leaderids": [ 22933, 26569, 26568],

   "score": 2184.44,

   "color": "black",

   "members": 12,

            "accepting members": 1,

   "applicants": 0,

            "flagurl": "https://i.imgur.com/v8t0QP5.jpg",

   "forumurl": "",

   "irc": "#blingin",

   "gdp": "4547540416.04",

   "cities": "33",

   "soldiers": "151782",

   "tanks": "5859",

   "aircraft": "732",

   "ships": "4",

   "missiles": "3",

   "nukes": "0",

   "treasures": "0"

   }

  }

}

 

Edited by martbhell
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and the Guidelines of the game and community.