[rabbitmq-discuss] JSON Data to be send between Java Producer and Python Consumer
neo20iitkgp at gmail.com
Tue Apr 30 19:20:31 BST 2013
did u tried this settings at pub end
On Saturday, 20 April 2013 12:08:49 UTC+5:30, Arun Viswanath wrote:
> I'm facing an issue while sending the JSON data between Java Producer and
> Python Consumer.
> I doing the following serialization in my Java Producer for my JSON data
> and placing the serialize data in the Queue
> *Java Code:
> import org.json.simple.JSONObject;
> import org.json.simple.parser.JSONParser;
> // Reading the JSON content from the file and making it an JSONObject
> JSONObject serviceObj = (JSONObject) parser.parse(new
> String jsonText = new flexjson.JSONSerializer().serialize(jsonObj);
> channel.basicPublish("", CONDUCTOR_QUEUE_NAME, null, jsonText .getBytes());
> My python consumer successfully takes the data from the Queue but it is
> not able to process it.
> Python consumer is expected to deserialize the json message read from the
> Queue to Python dictionary but the data got after deserialize is python
> unicode type.
> My python consumer is third party code so I can't change my consumer side.
> I'm not sure whether I'm doing the correct stuff in my Java producer.
> Any help to resolve this issue will be appreciated.
> Thanks In Advance,
> Arun V
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rabbitmq-discuss