I did not get the exception for every tweet that I was trying to capture. half them got through while the rest errored out. most of them error out stating this Error [bxerr:BXJS0001]: JSON parser (1:3817): Char "0" found, " expected on my eclipse obviously with different line numbers. I am actually using JSONObject.toString to get the Json string
Is there a way i can make it print the whole stack trace?
On Tue, Jan 22, 2013 at 3:38 AM, Andreas Weiler andreas.weiler@uni-konstanz.de wrote:
Hi Abishek,
you have to use the raw JSON content of the status object from Twitter4J. DataObjectFactory.getRawJSON(status)
I didn't have any issues with parsing and storing that string.
-- Andreas
Am 22.01.2013 um 09:29 schrieb Christian Grün:
Hi Abishek,
our JSON Module assumes that the input is a correctly encoded Unicode string. More specifically, it takes an xs:string as argument, which should usually already be valid Unicode.
You could start and have a look at the rejected JSON strings by wrapping your json function call with try/catch:
for $json in ('...') return try { json:parse($json) } catch bxerr:BXJS0001 { 'Error message: ' || $err:description || out:nl() || 'Input string: ' || $json }
What’s the error message you are getting as result? Christian ___________________________
I am using twitter4j streaming api to capture tweets and feeding
them into a basex database, converting them into xml using json api.
While using the json:parse api, i get BXJS0001 error often. I assume
it is because of encoding. Is there an option available in the json:
api that would allow me to specify the enoding technique?
Also if i store the documents as a json, instead would it facilitate json query?
Thanks,
Abishek
BaseX-Talk mailing list
BaseX-Talk@mailman.uni-konstanz.de
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk