2011-01-19, 15:58
I'm not sure I understand what you want. The "id" tag should be used to match a response from XBMC to a request you sent yourself. Furthermore if you get a json object without an "id" tag it indicates that you received an announcement and not a response.
If you write your own parser you should basically count the number of { and } to determine the end of a message. And you should use a json library which can read a json object and detect the available fields and their values and not use regular expressions because there are alot of different response objects and I don't think you would want to write regex's for all of them.
If you write your own parser you should basically count the number of { and } to determine the end of a message. And you should use a json library which can read a json object and detect the available fields and their values and not use regular expressions because there are alot of different response objects and I don't think you would want to write regex's for all of them.