On Thu, Jan 19, 2017 at 9:43 AM, geoffreydebelie <geoffreydebelie@zoho.com> wrote:
However, I wonder why
https://nl.wikipedia.org/w/api.php?action=query&meta=tokens&type=login&format=json

returns
      "logintoken": "2c69b789da89c2134de2e6c142523de05880cbf3+\\"

instead of +\ at the end.

Because backslash is the escape character in JSON strings, and so needs to be escaped to represent an actual backslash. If your JSON decoder is not properly transforming that token into a native string ending with a single backslash then your JSON decoder is fundamentally broken and should probably be replaced.

If you're parsing the JSON with custom regular expressions or the like, you should really start using a proper JSON decoder.


--
Brad Jorsch (Anomie)
Senior Software Engineer
Wikimedia Foundation