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