[Json-rpc-java] mixing org.json library with json-rpc-java library

Michael Clark michael at metaparadigm.com
Thu Jun 15 09:05:10 SGT 2006


Arthur Blake wrote:
> It appears that the json-rpc-java library is using an older version of
> the org.json library.
>
> I am trying to use the newer library because it has some features that
> are not in the version used in json-rpc-java (such as XML conversion
> to and from json, and better json pretty printing.)
>
> Unfortunately the newer version and the version used in json-rpc-java
> don't seem to be compatible right off the bat either, because the
> various method in the JSONObject class can throw a JSONException which
> the json-rpc-java library does not expect.  I made a quick and dirty
> attempt to integrate the newer one just by catching the JSONException
> when it occurs and rethrowing a MarshallException or
> UnmarshallException throughout the code but it didn't work.
>
> Are there plans to integrate the newer library?  Until then, I'll have
> to refactor the package names in one of the libraries so that I can
> use both libraries without having a naming collision.
One option as you suggest may be to repackage the version included with
json-rpc-java. Probably the easiest. I'll look at that.

Michael.


More information about the Json-rpc-java mailing list