[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: JSON serialization issues
timfox
do-not-reply at jboss.com
Wed May 6 04:15:11 EDT 2009
"jmesnil" wrote : I've encountered several issues with JSON serialization yesterday:
|
| - int and long are decoded as Integer when using JSONObject.get(key) method
| => ClassCastException when the code is expecting a long and receives a integer
|
Internally JSON does not distinguish an int and a long (it's just a numeric string).
However when decoding if the number is too large to fit in a Java int it will use a long I believe, otherwise it will use an int.
So you should be ok just to cast. BTW I already did this in CoreMessagingProxy.
anonymous wrote :
| - String[] parameters are deserialized as Object[]
| => All the createConnectionFactory() methods don't work: the ManagementService will not find the matching method since Object[] and String[] are different types (and not assignable).
| I've hacked 1 createConnectionFactory method to pass the parameters as Object[] to run the JORAM tests but all the others methods won't work.
|
|
So change the params to Object[] ?...
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4228857#4228857
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4228857
More information about the jboss-dev-forums
mailing list