JSON response format
#1
Hi,
I have XBMC 11.0 installed on Ubuntu 10.04. There is a problem: the response in JSON RPC does not have new lines for each line. For example:

Request:
{"jsonrpc": "2.0", "method": "Application.GetProperties", "params":{"properties":["volume", "name", "muted", "version"]}, "id":5}

Response:
{"id":5,"jsonrpc":"2.0","result":{"muted":false,"name":"XBMC","version":{"major":11,"minor":0,"revision":"Unknown","tag":"stable"},"volume":80}}

If I run the XBMC 11.0 on Mac (Lion), I got the response formatted as below:

{
"id": 5,
"jsonrpc": "2.0",
"result": {
"muted": false,
"name": "XBMC",
"version": {
"major": 11,
"minor": 0,
"revision": "20120321-14feb09",
"tag": "stable"
},
"volume": 55
}
}

My question: how can I make XBMC on Ubuntu also respond JSON request with new lines for each line in its XML text?

Thanks.
Han
Reply
#2
There's an advancedsetting called <compactoutput> (see http://wiki.xbmc.org/index.php?title=Use...jsonrpc.3E) which you can set to "false" and you'll get pretty-printed results. But this is only meant for developers using JSON-RPC to be able to easier read the responses from XBMC. You shouldn't rely on it being disabled (compact output is the default).
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply

Logout Mark Read Team Forum Stats Members Help
JSON response format0