def send_json(self, ids=None):
items = ids or self._registration_id<EOL>values = {"<STR_LIT>": items}<EOL>if self._data is not None:<EOL><INDENT>values["<STR_LIT:data>"] = self._data<EOL><DEDENT>for key, val in self._kwargs.items():<EOL><INDENT>if val:<EOL><INDENT>values[key] = val<EOL><DEDENT><DEDENT>data = json.dumps(values, separators=("<STR_LIT:U+002C>", "<STR_LIT::>"), sort_keys=True).encode(<EOL>self.encoding)<EOL>result = json.loads(self._send(data, "<STR_LIT:application/json>"))<EOL>if ("<STR_LIT>" in result) and (result["<STR_LIT>"]):<EOL><INDENT>unregistered = []<EOL>throw_error = False<EOL>for index, error in enumerate(result.get("<STR_LIT>", [])):<EOL><INDENT>error = error.get("<STR_LIT:error>", "<STR_LIT>")<EOL>if error in ("<STR_LIT>", "<STR_LIT>"):<EOL><INDENT>unregistered.append(items[index])<EOL><DEDENT>elif error != "<STR_LIT>":<EOL><INDENT>throw_error = True<EOL><DEDENT><DEDENT>self.deactivate_unregistered_devices(unregistered)<EOL>if throw_error:<EOL><INDENT>raise GCMPushError(result)<EOL><DEDENT><DEDENT>return result<EOL>
Sends a json GCM message