Menu

#30 JSON Serializer produces invalid JSON

v1.0 (example)
open
nobody
None
5
2016-07-19
2015-12-16
No

The XmlRpcJsonSerializer is not producing valid json strings (it uses single quotes instead of double quotes), Moreover in the JSON-rpc standard the result should be inside a property called result.
I attach my class extending the functionality of XmlRpcJsonSerializer to fix these issues but I would reccomend to merge these changes inside XmlRpcJsonSerializer

1 Attachments

Discussion

  • Greger Olsson

    Greger Olsson - 2015-12-16

    Hi Lorentzo,

    Thanks for your bug report. The XmlRpcJsonSerializer is an old thing (2006, maybe older) that didn't follow any particular RPC-specification like JSON-RPC. So it definitely needs some fixes if people are still using it -- I also saw that it serializes Dates wrong.

    I'm a bit swamped with a few projects right now, but If you'd like to help I could give you commit access to the repository?

     
  • Greger Olsson

    Greger Olsson - 2015-12-16

    On another topic; perhaps this is a good time to move the repository to GitHub? That would make it a lot easier for people to contribute to the library than with the bulky SF.

     
  • Lorenzo Masetti

    Lorenzo Masetti - 2015-12-16

    Hi Gregor.
    Thanks for the fast answer. I guess it is a bit complext to give access rights to the repository but I attach the patched version of the serializer (basically i just merged the code that i was writing in the subclass). It is not tested (I did not even try to complie) but it should work if i did not do anything wrong with the copy paste

     
  • Lorenzo Masetti

    Lorenzo Masetti - 2015-12-17

    Hello again Gregor,
    just to tell you that I tested the modified version in my project and it works fine so you can include it in the next release if you want,

     
  • Lorenzo Masetti

    Lorenzo Masetti - 2016-01-04

    hello, happy new year
    Any plan to include this fix in the next release?

     
  • Lorenzo Masetti

    Lorenzo Masetti - 2016-07-19

    hi Gregor, seems you forgot about this issue :)
    Actually XmlRpcJsonSerializer.java is working fine so you can include it in the next release.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.