We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi all.
I try to initialize the JSONArray using:
processing.data.JSONArray jsonArray = new processing.data.JSONArray();
And then assign it to another JSON array but it gives me the error:
**cannot convert from JSONArray to JSONArray**
Answers
It works for me! [-(
It doesn't work when I try to assign a facebook.executeFQL(query) with the Facebook4J library :-(
If they come from different 3rd-party packages, it's obvious they're not the same class. >-)
Yes, these classes might have the same name, but are probably very different, so you cannot assign one instance to a variable of the other type.
I get that, although in the facebook4j example (http://facebook4j.org/en/code-examples.html), it shows a similar method to accomplish that - so I assume it works somehow, but I don't know how exactly. I always get errors with JSON...
"it shows a similar method to accomplish that"
I see no mention of Processing in this page. So, just use their implementation of Json, not the Processing one, which can be similar, but which is still different and incompatible.
"I always get errors with JSON"
Yeah, sure, but not being in front of your computer, I don't know which errors you have...
Oh, and I will move this topic to the Questions about Libraries category, since the question seems strongly related to using a given library.
Ok cool, I'll try that