Different JSON lib

As of Vaadin 7.2.2, the JSON lib has changed to the Android SDK implementation. However, the package name of such lib is org.json, just like the original
JSON
lib. Before this change i already had to import the org.json lib with Ivy, because my project depended on a JSON Tokener constructor which wasn’t present in the vaadin lib.

Since the change, even though i import the desired lib, when the method is called an exception is fired because the JSON Tokener class used is the one from vaadin and not mine (due to same package name, i guess). My question is: is there a way to replace the used JSON lib without screwing anything, or will i have to find a new way to implement my methods which relied on the original JSON Tokener?

Thanks

Hi Jorge,

The JSON lib was changed in 7.2 as it was also changed in the GWT project. This has turned out to be a bad move for Vaadin as the implementations are not 100% compatible but the package name is the same. It should be safe to exclude the Android JSON lib and rely on org.json as the problems seem to be mostly that org.json contains API not present in the Android JSON version.

The change causes multiple issues and conflicts with various libs that use/depend on the “real” org.json. We are trying to resolve this in the GWT project (
https://code.google.com/p/google-web-toolkit/issues/detail?id=8762
) and in Vaadin (
http://dev.vaadin.com/ticket/13944
).

I’m not 100% sure how we will solve this but today it seems likely that we want to rebase Android JSON to avoid conflicts.