精易论坛

标题: 不知道json怎么写 [打印本页]

作者: graywolf    时间: 2014-7-31 14:31
标题: 不知道json怎么写


提交头application/json{  "agent": {                             // defaults to Minecraft    "name": "Minecraft",                 // For Mojang's other game Scrolls, "Scrolls" should be used    "version": 1                         // This number might be increased                                         // by the vanilla client in the future  },  "username": "mojang account name",     // Can be an email address or player name for                                         // unmigrated accounts  "password": "mojang account password",  "clientToken": "client identifier"     // optional}
我这么写 一直提示格式不至上正确  那位大神帮帮小弟吧


作者: tjzoo111    时间: 2014-7-31 14:35
这个必须看看 1234556
作者: 真的很疼    时间: 2014-7-31 21:12
还要一个json对象把你那两个json加入进去
作者: graywolf    时间: 2014-8-1 06:24
真的很疼 发表于 2014-7-31 21:12
还要一个json对象把你那两个json加入进去

能具体说下吗
要是能给说下源码就好了
作者: mnblkj123    时间: 2014-8-1 06:35
其实这个应该没有什么标准答案啦,自己想想怎么写吧
作者: graywolf    时间: 2014-8-1 07:12
mnblkj123 发表于 2014-8-1 06:35
其实这个应该没有什么标准答案啦,自己想想怎么写吧

一直提交不对哦  我有没有写错了
作者: 真的很疼    时间: 2014-8-1 09:58
ˉ空城旧梦° 发表于 2014-8-1 06:24
能具体说下吗
要是能给说下源码就好了

你调试输出的json是什么样子贴出来看下
作者: graywolf    时间: 2014-8-1 10:02
真的很疼 发表于 2014-8-1 09:58
你调试输出的json是什么样子贴出来看下


* {"error":"Unsupported Media Type","errorMessage":"The server is refusing to service the request because the entity of the request is in a format not supported by the requested resource for the requested method"}
作者: 真的很疼    时间: 2014-8-1 10:25
ˉ空城旧梦° 发表于 2014-8-1 10:02
* {"error":"Unsupported Media Type","errorMessage":"The server is refusing to service the reques ...

不是这个 我是想看下你那个  json.到文本() 这个输出来的格式看下
作者: graywolf    时间: 2014-8-1 11:16
真的很疼 发表于 2014-8-1 10:25
不是这个 我是想看下你那个  json.到文本() 这个输出来的格式看下

0  是这样的
* {"agent":{"name":"minecraft","version":1},"username":"123456","password":"123456","clientToken":""}




欢迎光临 精易论坛 (https://125.confly.eu.org/) Powered by Discuz! X3.4