•   
  • 1
  • 187
  • 188
  • 189(current)
  • 190
  • 191
  • 226
  •   
JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC
One PR per change/feature/fix please.
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
Ok same for JSON version number ? The minor version will grows fast.
Reply
Yeah the numbers will grow fast but it's the only way to be able to determine from the number what exactly has been fixed/added in a specific version and what not.
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
Yes I know but with the merge windows and multiple PR keeping this value consistent will be hard.

I do 2 PR for 6.3 and 6.4 the 6.4 is ok the 6.3 is refused or needs tweaking and is pushed to next window or such.
And then another one does a PR and does not read all currents PRs.

The only master of this number after all is the commiter.
Reply
2559 (PR)

Easy one :p Just need validation on the fact I keep the default to false to keep consistency with Frodo ?
Reply
Starting a new thread for Playlist.Move to avoid spam http://forum.xbmc.org/showthread.php?tid=161770
Reply
@Montellese: Can individual JSON socket responses be terminated by a "\n" (or even "\0"/null, whatever is most suitable).

While performing a video library rescan I tried to run some JSON queries (eg. GetMovies) and the response I got over sockets included not only the movie data, but also concatenated on the end of this response was a VideoLibrary.OnUpdate notification. Since this response now contained two messages, it was impossible to parse.

At least if each message in a response were terminated with a "\n" it might be possible to split the response into individual messages (sub-responses) and process them individually. Without any suitable termination this is nigh on impossible. Terminators would also simplify socket reading, as you could more easily tell when all the available data has been read, by checking for a terminator within the retrieved data.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
(2013-04-11, 05:09)MilhouseVH Wrote: @Montellese: Can individual JSON socket responses be terminated by a "\n" (or even "\0"/null, whatever is most suitable).

While performing a video library rescan I tried to run some JSON queries (eg. GetMovies) and the response I got over sockets included not only the movie data, but also concatenated on the end of this response was a VideoLibrary.OnUpdate notification. Since this response now contained two messages, it was impossible to parse.

At least if each message in a response were terminated with a "\n" it might be possible to split the response into individual messages (sub-responses) and process them individually. Without any suitable termination this is nigh on impossible. Terminators would also simplify socket reading, as you could more easily tell when all the available data has been read, by checking for a terminator within the retrieved data.

This has been asked at least 5 times in the past and the answer hasn't changed: no. A proper JSON stream parser should ignore anything in between a final closing } and an initial opening { so adding something in between simply doesn't make sense. It will clutter the data stream and make the JSON-RPC implementation (not the API) XBMC specific. And it's far from impossible to count opening and closing { } to determine when a message is finished. If you use the search there are quite some example code snippets that show how it can be done.
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
(2013-04-11, 07:51)Montellese Wrote: This has been asked at least 5 times in the past and the answer hasn't changed: no.

I'd have hoped there might be a way to make it optional.

(2013-04-11, 07:51)Montellese Wrote: A proper JSON stream parser should ignore anything in between a final closing } and an initial opening { so adding something in between simply doesn't make sense.

So a "proper" JSON parser shouldn't have any problem with a message terminated by a newline then? Although that's not the problem I'm raising, it's the concatenation of two objects in a single response, which can't then be parsed as it throws an "extra data" exception (although maybe the standard json module in Python isn't "proper"?)

(2013-04-11, 07:51)Montellese Wrote: And it's far from impossible to count opening and closing { } to determine when a message is finished. If you use the search there are quite some example code snippets that show how it can be done.

Far from impossible, yes, but a major overhead (you have to be aware of embedded braces too, that are not structural) in place of something so trivial as an end of message terminator.

Out of interest if you know of any examples you can point me to, that would help - I've searched on this subject previously and not found anything useful, beyond people saying it can be done "if you have to" as other methods (length prefix, message terminator) are acknowledged as preferred implementations.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
(2013-04-11, 18:10)MilhouseVH Wrote: I'd have hoped there might be a way to make it optional.
So that your application only works with xbmc installations that have the option enabled?

(2013-04-11, 18:10)MilhouseVH Wrote: So a "proper" JSON parser shouldn't have any problem with a message terminated by a newline then? Although that's not the problem I'm raising, it's the concatenation of two objects in a single response, which can't then be parsed as it throws an "extra data" exception (although maybe the standard json module in Python isn't "proper"?)
The problem is that you consider the TCP socket to work in messages but it's just a stream of bytes/characters. There's no message structure or anything. You read one byte after another and read and read until there's no more data or until the next higher layer has detected a packet/message. In this case the next higher layer is the logic that counts { and } and only forwards that part of the received data that it detected as a whole JSON-RPC request (or JSON object). Obviously you can't pass two JSON objects to python's JSON parser.

(2013-04-11, 07:51)Montellese Wrote: And it's far from impossible to count opening and closing { } to determine when a message is finished. If you use the search there are quite some example code snippets that show how it can be done.

(2013-04-11, 18:10)MilhouseVH Wrote: Out of interest if you know of any examples you can point me to, that would help - I've searched on this subject previously and not found anything useful, beyond people saying it can be done "if you have to" as other methods (length prefix, message terminator) are acknowledged as preferred implementations.
I'd have to use the same search functionalities as are available to you. All I need to know is that topfs2 and myself have discussed this topic quite a few times and there have been code examples (probably even in python) on how to do it.
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
Hi, i am a beginner here, and just trying to find my way in json, i have the following question:
I want to play a radiostream that is in my favorites, what do you suggest is the right solution for this?

thanks in forward,

Frans
Reply
Player.Open with the plugin url you can find in the Favorites.xml.

Favourites support from JSON should be added in May merge window.
Reply
With This request I receive one error in latest gotham master code:

Code:
{jsonrpc": "2.0", "method": "VideoLibrary.GetMovieSetDetails", "params": {"setid": %s, "properties": [ "thumbnail" ], "movies": { "properties":  [ "rating", "art", "file", "year", "director", "writer","genre" , "thumbnail", "runtime", "studio", "plotoutline", "plot", "country"], "sort": { "order": "ascending",  "method": "year" }} },"id": 1}

I receive error
{"error":{"code":-32700,"message":"Parse error."},"id":null,"jsonrpc":"2.0"}

Any tip how I solve this.
MediaBrazil forum Website - Youtube Channel
Aeon MQ9-0.1.0 & Ace2 Skin Team
MarcosQui Website Donate and support us.
Reply
(2013-04-18, 21:12)Wanilton Wrote: With This request I receive one error in latest gotham master code:

Code:
{jsonrpc": "2.0", "method": "VideoLibrary.GetMovieSetDetails", "params": {"setid": %s, "properties": [ "thumbnail" ], "movies": { "properties":  [ "rating", "art", "file", "year", "director", "writer","genre" , "thumbnail", "runtime", "studio", "plotoutline", "plot", "country"], "sort": { "order": "ascending",  "method": "year" }} },"id": 1}

I receive error
{"error":{"code":-32700,"message":"Parse error."},"id":null,"jsonrpc":"2.0"}

Any tip how I solve this.

Yes put a " before "jsonrpc" at the very beginning. When you get a "Parse error" there's something wrong with the JSON object, not with JSON-RPC. You can use http://jsonlint.com for JSON object validation.
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
Version 6.3.0

April 7th 2013:
Commit: 5c636c0c8517b5f4b5410dbfc279048a84a309f0
Add recursive parameter to Playlist.Item directories

April 8th 2013:
Commit: 08951d3057315e8922ed0a917ae1ae787e3e4e6b
There has been a change in xbmc internal database paths. Old paths like "videodb://1/2/" (for the movie title list) don't work anymore and need to be replaced with something like "videodb://movies/titles/".
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
  •   
  • 1
  • 187
  • 188
  • 189(current)
  • 190
  • 191
  • 226
  •   
 
Thread Rating:
  • 8 Vote(s) - 5 Average



Logout Mark Read Team Forum Stats Members Help
JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC58